Commit Graph

11607 Commits

Author SHA1 Message Date
Dan Gohman
005752bbe7 Make getPredecessorWithUniqueSuccessorForBB return the unique successor
in addition to the predecessor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 16:19:08 +00:00
Gabor Greif
9ee1720811 back out r101364, as it trips the linux nightlybot on some clang C++ tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 12:46:56 +00:00
Gabor Greif
165dac08d1 rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 10:49:53 +00:00
Dan Gohman
ae541aad5c Add more const qualifiers for LLVM IR pointers in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 04:33:49 +00:00
Dan Gohman
46510a73e9 Add const qualifiers to CodeGen's use of LLVM IR constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:51:59 +00:00
Dan Gohman
070c07f2c8 Fix TrackingVH to handle const Value subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:24:25 +00:00
Dan Gohman
75d4ec3cae Remove a const here. This makes this function consistent with all the
other getOperand wrappers, and it makes it easier to use with DebugInfo
code, which isn't currently prepared to see const MDNode *.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:23:05 +00:00
Dan Gohman
0a60fa3321 Constify GetConstantStringInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:20:45 +00:00
Dan Gohman
7ad3b2a3f0 Move a bunch of methods from CallSite to CallSiteBase, so that they can
be used in ImmutableCallSite too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 21:47:32 +00:00
Dan Gohman
7b975f411f Use FunTy instead of hard-coding Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:49:44 +00:00
Dan Gohman
ce931088f3 Oops, make these public.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:31:28 +00:00
Dan Gohman
d9587fddd6 Move getType() and getCaller() into CallSiteBase so that
ImmutableCallSite can use them too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:28:44 +00:00
Dan Gohman
6465265ae1 Delete unneeeded arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:17:22 +00:00
Dan Gohman
6a732b5a66 Delete unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:05:00 +00:00
Dan Gohman
2520864773 Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 19:53:31 +00:00
Dan Gohman
833ec1deed Fix a missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:57:18 +00:00
Dan Gohman
11609451a5 Refine #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:49:17 +00:00
Dan Gohman
4031d59685 Split ISD::NodeType and a few related items out of SelectionDAGNodes.h
into a separate header to allow clients to use them without pulling in
SelectionDAG-specific declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:44:34 +00:00
Dan Gohman
c21a2dc8df Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:22:02 +00:00
Dan Gohman
441516fb3d Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:54:39 +00:00
Dan Gohman
98708260f5 Move the code for emitting livein copies out of SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:51:49 +00:00
Dan Gohman
5861142dad Fix whitespace, comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 15:59:02 +00:00
Dan Gohman
4788ec49a9 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101246 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 15:50:02 +00:00
Dan Gohman
6193e5b128 Use C++, not C++-standard-library-internals-ese.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 15:41:50 +00:00
Dan Gohman
8bc489fd7f Make SuccIterator's private parts private too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 15:38:15 +00:00
Dan Gohman
0118b8d86d Make helper utility members private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 15:33:04 +00:00
Chris Lattner
d305035155 implement mc asmparser support for '.', which gets the
current PC.  rdar://7834775

We now produce an identical .o file compared to the cctools
assembler for something like this:

_f0:
L0:
        jmp L1
        .long . - L0
L1:
        jmp A
        .long . - L1

        .zerofill __DATA,_bss,A,0



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:28 +00:00
Daniel Dunbar
07b3a041b4 Fix -Asserts warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101191 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 23:34:11 +00:00
Sean Callanan
535f4de469 Quick fix for build errors caused by undefined
NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 21:36:35 +00:00
Sean Callanan
9899f70a74 Fixed a nasty layering violation in the edis source
code.  It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis.  If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 21:21:57 +00:00
Dan Gohman
81bf03eb5c Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:57:55 +00:00
Dan Gohman
13e73f483e Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:55:37 +00:00
Dan Gohman
5c982949bf Delete an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:51:39 +00:00
Owen Anderson
fd64901579 SCCVN, we hardly knew ye!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 05:24:08 +00:00
Daniel Dunbar
afc9a0c6b0 VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type
without occasionally needed to call IntegerType::get.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 01:39:07 +00:00
Daniel Dunbar
ee09d2781d IRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 01:38:57 +00:00
Chris Lattner
43ac721e3b add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 00:36:43 +00:00
Dan Gohman
53c66eacc4 Enhance ScalarEvolution::isKnownPredicate with support for
loop conditions which are invariants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 22:16:48 +00:00
Dan Gohman
e48172710b Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100992 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 22:07:56 +00:00
Dan Gohman
d908bbf727 Fix a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:27:52 +00:00
Dan Gohman
3948d0b8b0 Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
that it's only testing for the entry condition, not full loop-invariant
conditions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:27:13 +00:00
Benjamin Kramer
b61e94fcf8 utostr isn't going away too soon, try to make it slightly smaller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:00:03 +00:00
Ted Kremenek
76e94e541c Move 'Optional' class from Clang to LLVM/ADT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:25:54 +00:00
Bob Wilson
666f8cb9b7 Fix up header comments to match the comment fixups I made in r100849.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 16:24:49 +00:00
Dan Gohman
094b1c851d Don't use reserved identifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 01:19:28 +00:00
Dan Gohman
e056781323 Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 23:03:40 +00:00
Chris Lattner
287df1bc03 delete a forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:34:17 +00:00
Chris Lattner
74aae4726a move elf section uniquing to MCContext. Along the way
merge XCore's section into MCSectionELF


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:26:26 +00:00
Chris Lattner
22772214de remove the TargetLoweringObjectFileMachO::getMachoSection
api and update clients to use MCContext instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:40:11 +00:00
Chris Lattner
f0559e4b24 move macho section uniquing from MCParser and TLOF to MCContext where
the compiler and asmparser now unique to the same sections.  This fixes
rdar://7835021.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:30:37 +00:00