diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-03-13 21:15:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-03-13 21:15:59 +0000 |
commit | 9a507cd915e6460bc7dadee2185c53df326274c1 (patch) | |
tree | 4d7daeb9953ee7f0c03f2446034b1889803f777e /include/llvm/Support/CallSite.h | |
parent | ea9f4df616995a70fff368c2cc0cf69df636aeaf (diff) | |
download | llvm-9a507cd915e6460bc7dadee2185c53df326274c1.tar.gz llvm-9a507cd915e6460bc7dadee2185c53df326274c1.tar.bz2 llvm-9a507cd915e6460bc7dadee2185c53df326274c1.tar.xz |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r-- | include/llvm/Support/CallSite.h | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 38260d8cc2..dc41590fb8 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -119,7 +119,7 @@ public: /// Value *getCalledValue() const { assert(getInstruction() && "Not a call or invoke instruction!"); - return *getCallee(); + return getInstruction()->getOperand(0); } /// getCalledFunction - Return the function being called if this is a direct @@ -133,7 +133,7 @@ public: /// void setCalledFunction(Value *V) { assert(getInstruction() && "Not a call or invoke instruction!"); - *getCallee() = V; + getInstruction()->setOperand(0, V); } Value *getArgument(unsigned ArgNo) const { @@ -147,16 +147,6 @@ public: getInstruction()->setOperand(getArgumentOffset() + ArgNo, newVal); } - /// Given a value use iterator, returns the argument that corresponds to it. - /// Iterator must actually correspond to an argument. - unsigned getArgumentNo(Value::use_iterator I) const { - assert(getInstruction() && "Not a call or invoke instruction!"); - assert(arg_begin() <= &I.getUse() && &I.getUse() < arg_end() - && "Argument # out of range!"); - - return &I.getUse() - arg_begin(); - } - /// Given an operand number, returns the argument that corresponds to it. /// OperandNo must be a valid operand number that actually corresponds to an /// argument. @@ -182,7 +172,7 @@ public: return getInstruction()->op_begin() + getArgumentOffset(); } - arg_iterator arg_end() const { return getInstruction()->op_end() - getArgumentEndOffset(); } + arg_iterator arg_end() const { return getInstruction()->op_end(); } bool arg_empty() const { return arg_end() == arg_begin(); } unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); } @@ -191,25 +181,17 @@ public: } bool isCallee(Value::use_iterator UI) const { - return getCallee() == &UI.getUse(); + return getInstruction()->op_begin() == &UI.getUse(); } + private: /// Returns the operand number of the first argument unsigned getArgumentOffset() const { if (isCall()) return 1; // Skip Function else - return 0; // Args are at the front + return 3; // Skip Function, BB, BB } - - unsigned getArgumentEndOffset() const { - if (isCall()) - return 0; // Unchanged - else - return 3; // Skip BB, BB, Function - } - - User::op_iterator getCallee() const; }; } // End llvm namespace |