#
916f48a0 |
| 05-Feb-2010 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Teach SimplifyCFG about magic pointer constants.
Weird code sometimes uses pointer constants other than null. This patch teaches SimplifyCFG to build switch instructions in those cases.
Code like t
Teach SimplifyCFG about magic pointer constants.
Weird code sometimes uses pointer constants other than null. This patch teaches SimplifyCFG to build switch instructions in those cases.
Code like this:
void f(const char *x) { if (!x) puts("null"); else if ((uintptr_t)x == 1) puts("one"); else if (x == (char*)2 || x == (char*)3) puts("two"); else if ((intptr_t)x == 4) puts("four"); else puts(x); }
Now becomes a switch:
define void @f(i8* %x) nounwind ssp { entry: %magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1] switch i64 %magicptr23, label %if.else16 [ i64 0, label %if.then i64 1, label %if.then2 i64 2, label %if.then9 i64 3, label %if.then9 i64 4, label %if.then14 ]
Note that LLVM's own DenseMap uses magic pointers.
llvm-svn: 95439
show more ...
|
#
28943873 |
| 05-Jan-2010 |
Dan Gohman <gohman@apple.com> |
Use do+while instead of while for loops which obviously have a non-zero trip count. Use SmallVector's pop_back_val().
llvm-svn: 92734
|
#
f21a220b |
| 22-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR5795 by merging duplicated return blocks. This could go further by merging all returns in a function into a single one, but simplifycfg currently likes to duplicate the return (an unfor
Implement PR5795 by merging duplicated return blocks. This could go further by merging all returns in a function into a single one, but simplifycfg currently likes to duplicate the return (an unfortunate choice!)
llvm-svn: 91890
show more ...
|
#
621fe561 |
| 23-Nov-2009 |
Nick Lewycky <nicholas@mxc.ca> |
Remove LLVMContext and its include.
llvm-svn: 89644
|
#
37536b90 |
| 01-Nov-2009 |
Chris Lattner <sabre@nondot.org> |
remove a bunch of locking from LLVMContextImpl. Since only one thread can be banging on a context at a time, this isn't needed. Owen, please review.
llvm-svn: 85728
|
Revision tags: llvmorg-2.6.0 |
|
#
2d60e1ec |
| 03-Sep-2009 |
Gabor Greif <ggreif@gmail.com> |
back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure
llvm-svn: 80871
|
#
14dfba6d |
| 03-Sep-2009 |
Gabor Greif <ggreif@gmail.com> |
re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...
llvm-svn: 80858
|
#
2dd09dbd |
| 02-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861
llvm-svn: 80766
|
#
a3e620ca |
| 30-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
add getPointerAddressSpace() to GEP instruction, use the method in a few scalar xforms to simplify things.
llvm-svn: 80506
|
#
55f1c09e |
| 13-Aug-2009 |
Owen Anderson <resistor@mac.com> |
Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
|
#
b292b8ce |
| 30-Jul-2009 |
Owen Anderson <resistor@mac.com> |
Move more code back to 2.5 APIs.
llvm-svn: 77635
|
#
47db941f |
| 22-Jul-2009 |
Owen Anderson <resistor@mac.com> |
Get rid of the Pass+Context magic.
llvm-svn: 76702
|
#
3be62697 |
| 14-Jul-2009 |
Dale Johannesen <dalej@apple.com> |
Revert 75571; I'm convinced this isn't the right thing to do.
llvm-svn: 75642
|
#
85ae7480 |
| 14-Jul-2009 |
Dale Johannesen <dalej@apple.com> |
Don't delete asm's just because their inputs are undefined; xor R, R is a common and valid idiom for zeroing a register, for example.
llvm-svn: 75571
|
#
38264b15 |
| 06-Jul-2009 |
Owen Anderson <resistor@mac.com> |
"LLVMContext* " --> "LLVMContext *"
llvm-svn: 74878
|
#
340288c6 |
| 03-Jul-2009 |
Owen Anderson <resistor@mac.com> |
Even more passes being LLVMContext'd.
llvm-svn: 74781
|
#
3dd5c5d2 |
| 12-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
second half of fix for PR4366: don't zap store to null of non-default addrspaces.
llvm-svn: 73253
|
#
4bb96e9a |
| 13-Mar-2009 |
Bill Wendling <isanbard@gmail.com> |
Revert r66920. It was causing failures in the self-hosting buildbot (in release mode).
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox
Revert r66920. It was causing failures in the self-hosting buildbot (in release mode).
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes
--- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm-svn: 66953
show more ...
|
#
258232fb |
| 13-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
Second installment of "BasicBlock operands to the back" changes.
For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end().
Second installment of "BasicBlock operands to the back" changes.
For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end().
This patch introduces some temporary uglyness in CallSite. Next I'll bring CallInst up to a similar scheme and then the uglyness will magically vanish.
This patch also exposes all the reliance of the libraries on InvokeInst's operand ordering. I am thinking of taking care of that too.
llvm-svn: 66920
show more ...
|
Revision tags: llvmorg-2.5.0, llvmorg-2.4.0 |
|
#
4c758ea3 |
| 25-Sep-2008 |
Devang Patel <dpatel@apple.com> |
Large mechanical patch.
s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g
This sets the stage - to implement function notes as function a
Large mechanical patch.
s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g
This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
show more ...
|
#
ba3fa6c6 |
| 23-Sep-2008 |
Devang Patel <dpatel@apple.com> |
s/ParameterAttributes/Attributes/g
llvm-svn: 56513
|
#
3d56051f |
| 08-Sep-2008 |
Devang Patel <dpatel@apple.com> |
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
llvm-svn: 55965
|
#
a79db30d |
| 04-Sep-2008 |
Dan Gohman <gohman@apple.com> |
Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
|
Revision tags: llvmorg-2.3.0 |
|
#
e15051d6 |
| 14-May-2008 |
Chris Lattner <sabre@nondot.org> |
rename SimplifyCFG.cpp -> SimplifyCFGPass.cpp
llvm-svn: 51130
|