Bill Wendling
96e37540a0
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
2009-03-13 21:15:59 +00:00
Gabor Greif
6a76677e1b
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
2009-03-13 18:27:29 +00:00
Gabor Greif
d56b0a8c03
introduce a useful abstraction to find out if a Use is in the call position of an instruction
...
llvm-svn: 62788
2009-01-22 21:35:57 +00:00
Gabor Greif
d46326b0da
make comparisons a bist faster
...
llvm-svn: 62428
2009-01-17 19:03:45 +00:00
Gabor Greif
436a7dd98c
drats! remove tabs
...
llvm-svn: 62056
2009-01-11 22:39:04 +00:00
Gabor Greif
20c5fd503d
simplify CallSite helper class to not consult the Instruction's
...
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.
llvm-svn: 62055
2009-01-11 22:33:22 +00:00
Devang Patel
64dd7a2e89
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
2008-09-25 21:00:45 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Matthijs Kooijman
4cf0a68307
Add CallSite::getArgumentNo() to be able to translate an operand number into a
...
argument number.
llvm-svn: 53225
2008-07-08 08:51:47 +00:00
Matthijs Kooijman
8aaa85f108
Add CallSite::getArgumentOffset() to hide the differences in operands betwen
...
Call and Invoke in a single method instead of having it hardcoded in multiple
places.
llvm-svn: 53224
2008-07-08 08:50:32 +00:00
Duncan Sands
b854603cb5
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Matthijs Kooijman
6216df14cb
* Make CallSite::hasArgument const and let it take a const parameter.
...
llvm-svn: 51989
2008-06-05 08:04:58 +00:00
Matthijs Kooijman
de47a7518d
Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.
...
llvm-svn: 51946
2008-06-04 16:31:12 +00:00
Evan Cheng
ce2c3b07ba
Revert 51775.
...
llvm-svn: 51795
2008-05-30 22:47:19 +00:00
Evan Cheng
8ebaae9d1c
Patches for building llvm on Solaris x86. Contributed by Nathan Keynes.
...
llvm-svn: 51775
2008-05-30 17:16:20 +00:00
Chris Lattner
f5e5f92891
Add support for equality comparison of CallSite's.
...
llvm-svn: 49616
2008-04-13 19:40:26 +00:00
Chris Lattner
7925cc72c0
Reimplement the parameter attributes support, phase #1 . hilights:
...
1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.
Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.
llvm-svn: 48289
2008-03-12 17:45:29 +00:00
Dale Johannesen
a96eb3a1d8
Pass alignment on ByVal parameters, from FE, all
...
the way through. It is now used for codegen.
llvm-svn: 47484
2008-02-22 17:49:45 +00:00
Dale Johannesen
ecb2b233b1
Expand ParameterAttributes to 32 bits (in preparation
...
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.
llvm-svn: 47342
2008-02-19 21:38:47 +00:00
Duncan Sands
a85448506d
Simplify caller updating using a CallSite, as
...
requested by Chris. While there, do the same
for an existing function committed by someone
called "lattner" :)
llvm-svn: 47273
2008-02-18 17:32:13 +00:00
Owen Anderson
b0dee942db
Add support for setting parameters to CallSite.
...
llvm-svn: 47249
2008-02-18 00:10:55 +00:00
Chris Lattner
9ec341b120
Split param attr implementation out from Function.cpp into its
...
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.
llvm-svn: 45517
2008-01-02 23:42:30 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Duncan Sands
56f3add5b7
When inlining through an 'nounwind' call, mark inlined
...
calls 'nounwind'. It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.
llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Duncan Sands
242f80be86
Rename isNoReturn to doesNotReturn, and isNoUnwind to
...
doesNotThrow.
llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Duncan Sands
bf62f62058
Make instcombine promote inline asm calls to 'nounwind'
...
calls. Remove special casing of inline asm from the
inliner. There is a potential problem: the verifier
rejects invokes of inline asm (not sure why). If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created. This is bad but
I'm not sure what the best approach is. I'm tempted
to remove the check in the verifier...
llvm-svn: 45073
2007-12-16 15:51:49 +00:00
Duncan Sands
1e2e4972ff
Rather than having special rules like "intrinsics cannot
...
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).
llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands
1b0feb42e2
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Dan Gohman
50ba8a297c
Add empty() member functions to a few container-like classes.
...
llvm-svn: 42487
2007-10-01 16:01:23 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
d2dfcb3c0e
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Misha Brukman
8018cc9e05
Remove trailing whitespace
...
llvm-svn: 21411
2005-04-21 20:48:15 +00:00
Chris Lattner
37651b157b
Update comments, now that CPR's are gone, inline the methods
...
llvm-svn: 17957
2004-11-18 17:46:57 +00:00
Chris Lattner
bbd13a8e4e
Add useful method, minor cleanups
...
llvm-svn: 17715
2004-11-13 23:28:10 +00:00
Chris Lattner
202207c83f
Warning foo
...
llvm-svn: 14035
2004-06-05 00:17:13 +00:00
Vikram S. Adve
f4fed4aaa2
Add getCaller() method.
...
llvm-svn: 13650
2004-05-23 08:02:45 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
f84726a3fd
Add a warning about not "new"ing or "delete"ing CallSites
...
llvm-svn: 9782
2003-11-07 19:25:22 +00:00
Brian Gaeke
eb6b11c9e0
A few handy methods that seem to mesh well with what CallSite already provides.
...
llvm-svn: 9737
2003-11-05 20:25:33 +00:00
Chris Lattner
6bdf3f6928
Allow CallSites to be used as the key of a map
...
llvm-svn: 9660
2003-11-02 23:04:33 +00:00
Chris Lattner
78b09155e1
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Chris Lattner
3cd24ce25a
Add assertions
...
llvm-svn: 9443
2003-10-23 19:33:49 +00:00
John Criswell
16c6cda9d5
Added LLVM copyright header (for lack of a better term).
...
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Misha Brukman
32c5aec6ec
Fix spelling.
...
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Chris Lattner
67594b9975
* Add new CallSite::get factory method
...
* add new setCalledFunction method
* FIX arg_end method which was horribly broken!
llvm-svn: 6758
2003-06-17 22:16:59 +00:00
Chris Lattner
5615d77ee1
Make sure accessor is properly doxygenized. It wants two lines
...
llvm-svn: 6756
2003-06-17 21:44:51 +00:00
Chris Lattner
260440f727
Add accessor
...
llvm-svn: 6755
2003-06-17 21:44:31 +00:00
Chris Lattner
8b6107ebf2
Make CallSite's default constructable, copyable, and assignable (explicitly)
...
llvm-svn: 6749
2003-06-17 19:50:28 +00:00
Chris Lattner
caba6cfcf5
Initial checkin of CallSite wrapper for Call/Invoke instructions
...
llvm-svn: 5618
2003-02-24 20:35:45 +00:00