Chris Lattner
cc1cfda9ea
add some helper functions.
...
llvm-svn: 83293
2009-10-05 05:05:57 +00:00
Chris Lattner
9ca7c0913a
code simplifications.
...
llvm-svn: 83292
2009-10-05 05:00:35 +00:00
Evan Cheng
ef716b04b3
Move implicit and paralle to a separate codegen specific section.
...
llvm-svn: 83291
2009-10-05 02:51:06 +00:00
Chris Lattner
463716d559
instcombine shouldn't delete all null checks for mallocs.
...
This fixes PR5130.
llvm-svn: 83290
2009-10-05 02:47:47 +00:00
Chris Lattner
ff00c3562a
stop MachineFunctionPass from claiming that it preserves LoopDependence info,
...
which causes dependence info to be linked into lli.
llvm-svn: 83289
2009-10-05 02:35:05 +00:00
Chris Lattner
cb08fb7b83
remove llvm-db: it is completely broken and if anyone wants to do a debugger,
...
they should not base it on llvm-db (which not following almost any "best practices").
llvm-svn: 83288
2009-10-05 02:29:51 +00:00
Chris Lattner
4002c8eeaa
add some completely unformated and probably incoherent notes about things
...
I saw while reading all the commits between the 2.5 and 2.6 release branches.
llvm-svn: 83287
2009-10-05 02:12:39 +00:00
Owen Anderson
b5049bebb3
Do away with the strange use of BitVectors in SSI, and just use normal sets. This makes the code much more C++/LLVM-ish.
...
llvm-svn: 83286
2009-10-04 18:49:55 +00:00
Jakob Stoklund Olesen
63c733faf9
Whitespace and formatting.
...
llvm-svn: 83285
2009-10-04 18:18:39 +00:00
Jakob Stoklund Olesen
befc8539d2
Remove trailing whitespace from build output.
...
llvm-svn: 83284
2009-10-04 17:54:36 +00:00
Owen Anderson
286feb16a9
Fix a typo in the comment.
...
llvm-svn: 83283
2009-10-04 17:52:13 +00:00
Owen Anderson
a62bf10651
SSI needs to require DT and DF transitively, since it uses them outside of its runOnFunction.
...
Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction.
llvm-svn: 83282
2009-10-04 17:47:39 +00:00
Oscar Fuentes
cfd4ec0226
CMake: remove .so file extension from library names when building
...
dependency info.
Patch by Peter Collingbourne!
llvm-svn: 83275
2009-10-04 06:24:57 +00:00
Evan Cheng
bb4ed2394b
Allow -inline-threshold override default threshold even if compiling to optimize for size.
...
llvm-svn: 83274
2009-10-04 06:13:54 +00:00
Evan Cheng
cd4c17aeaf
Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOccurrences.
...
llvm-svn: 83273
2009-10-04 05:25:42 +00:00
Nick Lewycky
ae4617c974
Requires element types in a constant initializer to match the element types of
...
of the constant. This reverts r6544 and r7428.
llvm-svn: 83270
2009-10-03 19:30:43 +00:00
Bob Wilson
d76b9b766c
Add a comment to describe letters used in multiclass name suffixes.
...
llvm-svn: 83257
2009-10-03 04:44:16 +00:00
Bob Wilson
a9abf57409
Fix encoding problem for VMLS instruction.
...
Thanks to Johnny Chen for pointing this out!
llvm-svn: 83256
2009-10-03 04:41:21 +00:00
Lang Hames
a7780905e7
Oops. Renamed remaining MachineInstrIndex references.
...
llvm-svn: 83255
2009-10-03 04:31:31 +00:00
Lang Hames
920301ecc5
Renamed MachineInstrIndex to LiveIndex.
...
llvm-svn: 83254
2009-10-03 04:21:37 +00:00
Benjamin Kramer
8de74bbbd8
Try to fix unit test linking on linux ...
...
llvm-svn: 83252
2009-10-02 19:52:33 +00:00
Benjamin Kramer
f01ee30328
MingW build fixes
...
- MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem.
Noticed by Ronald Pijnacker!
- Some parts of the System library must be build with exceptions on windows.
Based on a patch by Jay Foad!
llvm-svn: 83251
2009-10-02 19:36:31 +00:00
Benjamin Kramer
3b008a3a65
Fix a use-after-free in post-ra-scheduling.
...
MI->addOperand invalidates references to it's operands, avoid touching
the operand after a new one was added.
llvm-svn: 83249
2009-10-02 15:59:52 +00:00
Torok Edwin
b8de092f18
Fix make rule when objdir is inside srcdir.
...
llvm-svn: 83243
2009-10-02 09:30:03 +00:00
Evan Cheng
32a47ea7b6
getFunctionAlignment should return log2 alignment.
...
llvm-svn: 83242
2009-10-02 06:57:25 +00:00
Evan Cheng
4ad726b4be
Fix tests.
...
llvm-svn: 83241
2009-10-02 06:53:57 +00:00
Evan Cheng
9079fa2d27
Fix test.
...
llvm-svn: 83240
2009-10-02 06:50:50 +00:00
Evan Cheng
b5796a59c4
C++ member functions must be 2 byte aligned per ABI.
...
llvm-svn: 83239
2009-10-02 06:07:47 +00:00
Evan Cheng
b659dff4eb
Forgot about ARM::tPUSH. It also has a new writeback operand.
...
llvm-svn: 83237
2009-10-02 05:03:07 +00:00
Evan Cheng
2dcee28a61
Move load / store multiple before post-alloc scheduling.
...
llvm-svn: 83236
2009-10-02 04:57:15 +00:00
Evan Cheng
4b40bfd835
Test case for aligned attribute on function declaration.
...
llvm-svn: 83234
2009-10-02 04:45:37 +00:00
David Goodwin
d725159d9d
All callee-saved registers are live-out of a return block.
...
llvm-svn: 83223
2009-10-01 23:28:47 +00:00
David Goodwin
1cc6dd97da
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
...
llvm-svn: 83218
2009-10-01 22:19:57 +00:00
Mike Stump
70cb67fcf4
Expand api out in the usual inserter way, though, I do have a
...
question, can we get rid of the BasicBlock versions of all inserters
and use Head == 0 to indicate the old case when GetInsertBlock == 0?
llvm-svn: 83216
2009-10-01 22:08:58 +00:00
David Goodwin
9a051a5922
Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
...
llvm-svn: 83215
2009-10-01 21:46:35 +00:00
Evan Cheng
6f012d83f2
ARM::tPOP and tPOP_RET each has an extra writeback operand now.
...
llvm-svn: 83214
2009-10-01 20:54:53 +00:00
Jim Grosbach
7dbc2652b9
remove trailing whitespace
...
llvm-svn: 83213
2009-10-01 20:45:06 +00:00
Devang Patel
75cc16c0f2
Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
...
This is not yet enabled.
llvm-svn: 83210
2009-10-01 20:31:14 +00:00
David Goodwin
be3039e776
Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
...
llvm-svn: 83208
2009-10-01 19:45:32 +00:00
Devang Patel
787f94c28d
Record first and last instruction of a scope in DbgScope.
...
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Dan Gohman
8cf7907ba4
Don't use identifiers that start with an underscore followed
...
by a capital letter, which invokes undefined behavior.
llvm-svn: 83206
2009-10-01 17:39:52 +00:00
Douglas Gregor
f99626ed11
Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo
...
llvm-svn: 83203
2009-10-01 17:25:36 +00:00
Evan Cheng
4fb2891396
Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
...
operands of instructions with these properties while breaking anti-dep.
llvm-svn: 83198
2009-10-01 08:26:23 +00:00
Evan Cheng
1b2b64f618
Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
...
ld / st pairs, etc.
llvm-svn: 83197
2009-10-01 08:22:27 +00:00
Evan Cheng
46668e09be
Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
...
set, these flags indicate the instructions source / def operands have special
register allocation requirement that are not captured in their register classes.
Post-allocation passes (e.g. post-alloc scheduler) should not change their
allocations. e.g. ARM::LDRD require the two definitions to be allocated
even / odd register pair.
llvm-svn: 83196
2009-10-01 08:21:18 +00:00
Douglas Gregor
d846fbf20d
Remove GVNPRE.cpp from the CMake makefile
...
llvm-svn: 83194
2009-10-01 05:30:05 +00:00
Chris Lattner
5f3cc06cd2
remove the GVNPRE pass. It has been subsumed by the GVN pass.
...
Ok'd by Owen.
llvm-svn: 83193
2009-10-01 02:18:36 +00:00
Evan Cheng
4bcd523acb
Update ARM JIT emitter to account for ld/st multiple changes.
...
llvm-svn: 83192
2009-10-01 01:39:21 +00:00
Evan Cheng
3bbc6c3ae6
Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.
...
llvm-svn: 83191
2009-10-01 01:33:39 +00:00
Devang Patel
34986f12e6
Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
...
llvm-svn: 83190
2009-10-01 01:15:28 +00:00
Devang Patel
4dbca6dfd4
If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
...
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Devang Patel
e0709cfc92
Use MachineInstr as an processDebugLoc() argument.
...
This will allow processDebugLoc() to handle scopes for DWARF debug info.
llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Devang Patel
3256c751f5
Use MDNode * directly as an RecordSourceLine() argument.
...
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Devang Patel
5c13c2d392
Remove dead code.
...
llvm-svn: 83181
2009-09-30 22:43:52 +00:00
Devang Patel
a49be76f43
Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
...
llvm-svn: 83180
2009-09-30 22:34:41 +00:00
Bob Wilson
b2120755a2
Use OutStreamer.SwitchSection instead of writing out textual section directives.
...
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.
llvm-svn: 83178
2009-09-30 22:25:37 +00:00
Bob Wilson
b633d7a665
Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
...
to emit target-specific things at the beginning of the asm output. This
fixes a problem for PPC, where the text sections are not being kept together
as expected. The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives. The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text. With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.
llvm-svn: 83176
2009-09-30 22:06:26 +00:00
Bob Wilson
64c8d5a004
Fix a comment typo.
...
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Devang Patel
48575e3f2e
Check for null MDNode element while printing comment.
...
llvm-svn: 83172
2009-09-30 21:26:51 +00:00
Bob Wilson
53904987ae
Fix a comment.
...
llvm-svn: 83171
2009-09-30 21:26:13 +00:00
Bob Wilson
699702e0a8
The AsmPrinter base class contains a DwarfWriter member, so there's no need
...
for derived AsmPrinters to add another one. In some cases, fixing this
removes the need to override the doInitialization method.
llvm-svn: 83170
2009-09-30 21:24:45 +00:00
Jeffrey Yasskin
8ce67f83bc
Assert that ConstantArrays are created with correctly-typed elements.
...
llvm-svn: 83168
2009-09-30 21:08:08 +00:00
Dan Gohman
ea0bb8f555
Fix this code so that it doesn't try to iterate through a std::vector
...
while calling changeImmediateDominator, which removes elements from the
vector. This fixes PR5097.
llvm-svn: 83166
2009-09-30 20:54:16 +00:00
Reid Kleckner
cea8dab1d1
Silence comparison always false warning in -Asserts mode.
...
llvm-svn: 83164
2009-09-30 20:43:07 +00:00
Jim Grosbach
c87197784a
Add additional assert() to verify no extraneous use of a scavenged register.
...
llvm-svn: 83163
2009-09-30 20:35:36 +00:00
Devang Patel
711ab5b8ec
Print tag name for MDNodes that are used to encode debug info.
...
llvm-svn: 83160
2009-09-30 20:16:54 +00:00
Reid Kleckner
8ff5c19ebd
Fix integer overflow in instruction scheduling. This can happen if we have
...
basic blocks that are so long that their size overflows a short.
Also assert that overflow does not happen in the future, as requested by Evan.
This fixes PR4401.
llvm-svn: 83159
2009-09-30 20:15:38 +00:00
Devang Patel
7ba3c0906b
Silence unused variable warning.
...
llvm-svn: 83151
2009-09-30 17:13:41 +00:00
Jim Grosbach
a2fe1a6811
Clarify comment phrasing.
...
llvm-svn: 83148
2009-09-30 15:23:38 +00:00
Evan Cheng
ce5a8ca3ef
Add a option which would move ld/st multiple pass before post-alloc scheduling.
...
llvm-svn: 83145
2009-09-30 08:53:01 +00:00
Evan Cheng
f305ead1cc
Add a target hook to add pre- post-regalloc scheduling passes.
...
llvm-svn: 83144
2009-09-30 08:49:50 +00:00
Evan Cheng
3ea1ba7739
Forgot this test earlier.
...
llvm-svn: 83143
2009-09-30 08:41:27 +00:00
Chris Lattner
d6248143fa
add macruby, fix a validation problem.
...
llvm-svn: 83142
2009-09-30 06:27:22 +00:00
Nick Lewycky
6d59690c3e
Fix compile error as debug interface changed.
...
By the way, this code is buggy. You can't keep a map<MDNode *, something>
because the MDNode may be destroyed and reused for something else.
llvm-svn: 83141
2009-09-30 04:50:26 +00:00
Jim Grosbach
882f4c11ed
replace TRI->isVirtualRegister() with TargetRegisterInfo::isVirtualRegister()
...
per customary usage
llvm-svn: 83137
2009-09-30 01:47:59 +00:00
Jim Grosbach
70ce8a03b1
When checking whether we need to reserve a register for the scavenger,
...
the size of the saved frame pointer needs to be taken into account.
llvm-svn: 83136
2009-09-30 01:43:29 +00:00
Jim Grosbach
bcad0c8421
Add "isBarrier = 1" to return instructions.
...
Patch by Sylvere Teissier.
llvm-svn: 83135
2009-09-30 01:35:11 +00:00
Jim Grosbach
cdd3e35005
fix compiler warning
...
llvm-svn: 83132
2009-09-30 00:37:40 +00:00
David Goodwin
8dc2f6fefa
Remove regression that requires post-RA scheduling from a target that does not use that scheduler.
...
llvm-svn: 83128
2009-09-30 00:23:57 +00:00
Bob Wilson
20e5f5ed79
For Darwin, emit all the text section directives together before the dwarf
...
section directives. This causes the assembler to put the text sections at
the beginning of the object file, which helps work around a limitation of the
Darwin ARM relocations. Radar 7255355.
llvm-svn: 83127
2009-09-30 00:23:42 +00:00
Devang Patel
c2105298cc
Simplify.
...
llvm-svn: 83123
2009-09-30 00:14:40 +00:00
David Goodwin
17199b56b0
Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.
...
llvm-svn: 83122
2009-09-30 00:10:16 +00:00
Douglas Gregor
aa0beea9a1
Forward-declare ValueSymbolTable so that SymbolTableListTraits.h can be parsed by itself
...
llvm-svn: 83121
2009-09-30 00:08:25 +00:00
Mike Stump
14cf8ecf0b
Add a way for a frontend to generate more complex dwarf location
...
information. This allows arbitrary code involving DW_OP_plus_uconst
and DW_OP_deref. The scheme allows for easy extention to include,
any, or all of the DW_OP_ opcodes. I thought about just exposing all
of them, but, wasn't sure if people wanted the dwarf opcodes exposed
in the api. Is that a layering violation?
With this scheme, the entire existing block scheme used by llvm-gcc
can be switched over to the new scheme. I think that would be
cleaner, as then the compiler specific bits are not present in llvm
proper. Before the old code can be yanked however, similar code in
clang would have to be removed.
Next up, more testing.
llvm-svn: 83120
2009-09-30 00:08:22 +00:00
Jim Grosbach
fa6847f099
minor cleanup and add clarifying comment
...
llvm-svn: 83117
2009-09-29 23:17:20 +00:00
Devang Patel
7b4d52b170
Lookup handler name only when assertions are enabled.
...
llvm-svn: 83114
2009-09-29 22:05:52 +00:00
Devang Patel
b4034364d6
Add removeMD().
...
llvm-svn: 83107
2009-09-29 20:42:25 +00:00
Devang Patel
5bf7a49fd7
Only one custom meadata of each kind can be attached with an instruction.
...
llvm-svn: 83105
2009-09-29 20:30:57 +00:00
Jim Grosbach
3ea3fe6594
Additional check for regno==0
...
llvm-svn: 83103
2009-09-29 20:11:10 +00:00
Devang Patel
561977940c
Use assertion instead of early exit to catch malformed custom metadata store.
...
llvm-svn: 83102
2009-09-29 20:01:19 +00:00
Devang Patel
5d58383ea9
Remove unnecessary cast.
...
llvm-svn: 83100
2009-09-29 19:56:13 +00:00
Devang Patel
b296942f6d
Remove std::string uses from DebugInfo interface.
...
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Devang Patel
73e8d43588
Create empty StringRef is incoming cstring is NULL.
...
llvm-svn: 83082
2009-09-29 18:39:56 +00:00
Jim Grosbach
a4a7f44cb5
Simplify the tracking of virtual frame index registers. Ranges cannot overlap,
...
so a simple "current register" will suffice. Also add some additional
sanity-checking assertions to make sure things are as we expect.
llvm-svn: 83081
2009-09-29 18:23:15 +00:00
Jim Grosbach
8fc22227bb
Moving register scavenging to a post pass results in virtual registers in
...
the instruction we're scavenging for. The scavenger needs to know to avoid
them when analyzing register usage.
llvm-svn: 83077
2009-09-29 17:24:37 +00:00
David Goodwin
bef958c716
Post-RA regressions.
...
llvm-svn: 83075
2009-09-29 17:10:26 +00:00
Evan Cheng
139c3dba53
Fix PR4687. Pre ARMv5te does not support ldrd / strd. Patch by John Tytgat.
...
llvm-svn: 83058
2009-09-29 07:07:30 +00:00
Nick Lewycky
9b3f71600a
Regenerate.
...
llvm-svn: 83052
2009-09-29 06:18:23 +00:00
Nick Lewycky
fa4c2d3baf
Fix configure bug that only shows up in a clean build. Don't try to invoke gcc
...
until after the compiler itself has been set up.
llvm-svn: 83051
2009-09-29 06:18:00 +00:00
Nick Lewycky
c5975fce2b
Roll back r83048.
...
llvm-svn: 83050
2009-09-29 05:48:51 +00:00
Nick Lewycky
a2b1ac2a93
Regenerate.
...
llvm-svn: 83048
2009-09-29 05:41:21 +00:00
Nick Lewycky
90df990f73
On Linux, uname -m reports the kernel type. Some Linux systems are 32-bit but
...
with a 64-bit kernel, which confuses LLVM. Make LLVM double-check this by
checking which defines the system gcc actually sets.
llvm-svn: 83047
2009-09-29 05:40:45 +00:00
Devang Patel
ba4a6fdd17
Parse custom metadata attached with an instruction.
...
llvm-svn: 83033
2009-09-29 00:01:14 +00:00
Stuart Hastings
69d64f8e60
B&I's buildit forces a PATH that omits /Developer. Temporarily add
...
/Developer/usr/bin to the PATH when looking for llvm-gcc.
llvm-svn: 83028
2009-09-28 23:42:38 +00:00
Stuart Hastings
9df3d6d448
For B&I-style builds, tweak build_llvm script to prefer LLVM-G++ if
...
available. Override by setting CC and CXX in the environment.
llvm-svn: 83024
2009-09-28 22:17:53 +00:00
Jim Grosbach
5264202a38
Adjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
...
slot for the register scavenger when compiling Thumb1 functions.
llvm-svn: 83023
2009-09-28 22:08:06 +00:00
Dan Gohman
f919bd6651
Add C API calls for building FNeg operations. Patch by KS Sreeram!
...
llvm-svn: 83021
2009-09-28 21:51:41 +00:00
Devang Patel
2d85eef974
s/class Metadata/class MetadataContext/g
...
llvm-svn: 83019
2009-09-28 21:41:20 +00:00
Devang Patel
b1a4477f1f
Do not use global typedef for MDKindID.
...
llvm-svn: 83016
2009-09-28 21:14:55 +00:00
Jeffrey Yasskin
ed31cc2a99
Forgot to update the documentation in r82906. s/DEBUG_RUNTIME/DEBUG_SYMBOLS/.
...
llvm-svn: 83015
2009-09-28 21:14:38 +00:00
Devang Patel
1709e8c084
Remove unnecessary include.
...
llvm-svn: 83013
2009-09-28 21:06:38 +00:00
Dan Gohman
82ef61857e
Add a testcase for r83011.
...
llvm-svn: 83012
2009-09-28 21:03:02 +00:00
Dan Gohman
f230656a02
When extending the operands of an addrec, iterate through all
...
the operands, rather than trying to partition them into a start
and a step. This handles non-affine add recurrences correctly.
llvm-svn: 83011
2009-09-28 21:01:47 +00:00
Devang Patel
565371b4c9
Do not hardcode metadata names.
...
llvm-svn: 83010
2009-09-28 20:56:00 +00:00
Dan Gohman
46945e38ea
Add a CHECK line to check the position of the second divsd.
...
llvm-svn: 83009
2009-09-28 20:48:39 +00:00
Evan Cheng
4854ef0023
Fix Thumb2 IT block pass bug. t2MOVi32imm may not be the start of a IT block.
...
llvm-svn: 83008
2009-09-28 20:47:15 +00:00
Jakob Stoklund Olesen
0bb5af345a
Use KILL instead of IMPLICIT_DEF in LowerSubregs pass.
...
llvm-svn: 83007
2009-09-28 20:32:46 +00:00
Jakob Stoklund Olesen
dc9efe8078
Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
...
unused DECLARE instruction.
KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.
llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Dan Gohman
21c0774ba9
Add a testcase to help test analysis preservation.
...
llvm-svn: 83002
2009-09-28 18:40:27 +00:00
Dan Gohman
d1415a8e56
Create a README.txt for lib/Analysis, and add an entry.
...
llvm-svn: 83001
2009-09-28 18:38:53 +00:00
Devang Patel
59c0c1388f
Remove dead code.
...
llvm-svn: 82999
2009-09-28 18:31:56 +00:00
Dan Gohman
6905f15256
Use VerifySchedule instead of doing the work manually.
...
llvm-svn: 82995
2009-09-28 16:09:41 +00:00
Dan Gohman
86dc886584
Fix this debug output to handle the case where the loop has been deleted.
...
llvm-svn: 82994
2009-09-28 15:40:01 +00:00
Dan Gohman
0bd312afd8
Include the name of the loop header in debug messages.
...
llvm-svn: 82993
2009-09-28 15:07:18 +00:00
Dan Gohman
7d3b0be05b
Remove a redundant #ifndef and add an assertion string.
...
llvm-svn: 82991
2009-09-28 14:38:19 +00:00
Dan Gohman
9a7320c711
Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.
...
llvm-svn: 82990
2009-09-28 14:37:51 +00:00
Bob Wilson
2dd957fff6
Pass the optimization level when constructing the ARM instruction selector.
...
Otherwise, it is always set to "default", which prevents debug info from
even being generated during isel. Radar 7250345.
llvm-svn: 82988
2009-09-28 14:30:20 +00:00
Evan Cheng
83e0d481ae
Make ARM and Thumb2 32-bit immediate materialization into a single 32-bit pseudo
...
instruction. This makes it re-materializable.
Thumb2 will split it back out into two instructions so IT pass will generate the
right mask. Also, this expose opportunies to optimize the movw to a 16-bit move.
llvm-svn: 82982
2009-09-28 09:14:39 +00:00
Daniel Dunbar
86d4c28932
Don't traverse into .svn directories.
...
llvm-svn: 82978
2009-09-28 07:32:45 +00:00
Anton Korobeynikov
c30d816d7a
Fix thinko in my recent movt commit: it's not safe to remat movt, since it has input reg argument.
...
Disable rematting of it for now.
llvm-svn: 82975
2009-09-28 07:26:46 +00:00
Chris Lattner
0261b5d2d2
The select instruction is not neccesarily in the same block as the
...
phi nodes. Make sure to phi translate from the right block.
This fixes a llvm-building-llvm failure on GVN-PRE.cpp
llvm-svn: 82970
2009-09-28 06:49:44 +00:00
Evan Cheng
e0c5313493
Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
...
physical registers. This is especially critical for the later two since they
start the live interval of a super-register. e.g.
%DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
If this instruction is eliminated, the register scavenger will not be happy as
D0 is not defined previously.
This fixes PR5055.
llvm-svn: 82968
2009-09-28 05:28:43 +00:00
Erick Tryzelaar
16787bda38
Document a bug in the ocaml bindings has wrong linkage values.
...
llvm-svn: 82966
2009-09-28 04:42:55 +00:00
Erick Tryzelaar
c3a9a08e49
Expose the rest of the attribute settings.
...
llvm-svn: 82965
2009-09-28 04:42:47 +00:00
Erick Tryzelaar
b0d17ac4ef
Fix a bug in ocaml bindings that has incorrect linkage options.
...
llvm-svn: 82964
2009-09-28 04:42:36 +00:00
Mikhail Glushenkov
89cbdf0209
Regenerate.
...
llvm-svn: 82958
2009-09-28 01:28:26 +00:00
Mikhail Glushenkov
efc9763468
Add a way to query the number of input files.
...
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
b7787297f5
Document the 'not' combinator.
...
llvm-svn: 82956
2009-09-28 01:16:07 +00:00
Mikhail Glushenkov
1766617386
A bit prettier formatting.
...
llvm-svn: 82955
2009-09-28 01:15:44 +00:00
Dan Gohman
08d86dac71
Remove temporary debugging hack.
...
llvm-svn: 82953
2009-09-28 00:44:15 +00:00
Dan Gohman
4dbb301f17
Move the dominator verification code out of special code embedded within
...
the PassManager code into a regular verifyAnalysis method.
Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.
llvm-svn: 82952
2009-09-28 00:27:48 +00:00
Dan Gohman
2963777d0c
Move this assert to check the condition as soon as it is known.
...
llvm-svn: 82951
2009-09-28 00:10:28 +00:00
Dan Gohman
277e767578
Extend the StartPassTimer and StopPassTimer functions so that the
...
code that stops the timer doesn't have to search to find the timer
object before it stops the timer. This avoids a lock acquisition
and a few other things done with the timer running.
llvm-svn: 82949
2009-09-28 00:07:05 +00:00
Anton Korobeynikov
7c2b1e71c1
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
...
This should be better than single load from constpool.
llvm-svn: 82948
2009-09-27 23:52:58 +00:00
Dan Gohman
b0934cdd1c
Fix an old copy+pasto.
...
llvm-svn: 82947
2009-09-27 23:52:07 +00:00
Dan Gohman
adde5dfde2
Extract the code for inserting a loop into the loop queue into
...
a separate function.
llvm-svn: 82946
2009-09-27 23:49:43 +00:00
Dan Gohman
37a99664ff
When a loop is deleted, immediately release all of the active
...
LoopPasses for that loop. This avoids trouble with the PassManager
trying to call verifyAnalysis on them, and frees up some memory
sooner rather than later.
llvm-svn: 82945
2009-09-27 23:43:07 +00:00
Dan Gohman
5e8ba5d514
Extract the code for releasing a pass into a separate function, and
...
tidy it up a little.
llvm-svn: 82944
2009-09-27 23:38:27 +00:00
Nick Lewycky
93e06a57c9
Remove the "metadata*" type and simplify the code it complicated. This was only
...
used to support GlobalVariables storing MDNodes, back when they were derived
from Constant before the introduction of NamedMDNode, but never removed.
llvm-svn: 82943
2009-09-27 23:27:42 +00:00
Dan Gohman
a5fc03562f
LBRX no longer has an explicit SrcValueSDNode operand, so the type
...
operand is now at index 2, rather than 3. This fixes the
"Invalid child # of SDNode!" failures on PowerPC.
llvm-svn: 82942
2009-09-27 23:17:47 +00:00
Chris Lattner
4425660b1f
simplify some code.
...
llvm-svn: 82936
2009-09-27 21:46:50 +00:00
Chris Lattner
b2e88cd01c
The bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) -> icmp(x, null) already.
...
llvm-svn: 82935
2009-09-27 21:42:46 +00:00
Nick Lewycky
1f71578e0d
New unit test for the cloning module, which so far only covers cloning of
...
instructions' optimization flags.
llvm-svn: 82934
2009-09-27 21:39:46 +00:00
Chris Lattner
8b4d3dfbbf
calls are already unmovable, malloc doesn't need a special case.
...
llvm-svn: 82933
2009-09-27 21:36:19 +00:00
Chris Lattner
f9e0c7f84b
calls to external functions are already marked overdefined, special casing
...
malloc isn't needed.
llvm-svn: 82932
2009-09-27 21:35:11 +00:00
Chris Lattner
5abb1e4cd2
calls are already handled, malloc doesn't need a special case.
...
llvm-svn: 82931
2009-09-27 21:33:46 +00:00
Nick Lewycky
28a5f25d87
Round out the API for the new optimization flags.
...
llvm-svn: 82930
2009-09-27 21:33:04 +00:00
Chris Lattner
466d57f6c1
calls are rejected above, no need to special case malloc here.
...
llvm-svn: 82929
2009-09-27 21:31:39 +00:00
Chris Lattner
43d0db70ac
remove special handling of bitcast(malloc), it will be handled
...
when the loop inspects the bitcast operand.
llvm-svn: 82928
2009-09-27 21:29:28 +00:00
Chris Lattner
a8627272c1
unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.
...
llvm-svn: 82927
2009-09-27 21:23:38 +00:00
Chris Lattner
351a7ef01a
add a new DirectiveMap stringmap, which allows more efficient dispatching
...
to directive handlers and allows for easier extensibility.
I only switched a few over for now.
llvm-svn: 82926
2009-09-27 21:16:52 +00:00
Nick Lewycky
199c563cc8
Link order: it matters.
...
llvm-svn: 82925
2009-09-27 20:58:01 +00:00
Chris Lattner
b391e87263
allow pushing icmps through phis with multiple uses and across critical edges.
...
These are important to push up to encourage jump threading. This shrinks 176.gcc a bit.
llvm-svn: 82923
2009-09-27 20:46:36 +00:00
Chris Lattner
ae289632ef
Enhance the previous fix for PR4895 to allow more values than just
...
simple constants for the true/false value of the select. We now
do phi translation etc. This really fixes PR4895 :)
llvm-svn: 82917
2009-09-27 20:18:49 +00:00
Chris Lattner
facb867af3
implement PR4895, by making FoldOpIntoPhi handle select conditions
...
that are phi nodes. Also tighten up FoldOpIntoPhi to treat constantexpr
operands to phis just like other variables, avoiding moving constantexpr
computations around.
Patch by Daniel Dunbar.
llvm-svn: 82913
2009-09-27 19:57:57 +00:00
Chris Lattner
10a1cfd0f9
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
...
llvm-svn: 82911
2009-09-27 19:38:39 +00:00
Tilmann Scheller
336e2bd91b
Use explicit structs instead of std::pair to map callee saved regs to spill slots.
...
llvm-svn: 82909
2009-09-27 17:58:47 +00:00
Dan Gohman
cb663d749d
Delete a bogus comment.
...
llvm-svn: 82908
2009-09-27 17:50:44 +00:00
Dan Gohman
2115154d44
Remove a redundant assert.
...
llvm-svn: 82907
2009-09-27 17:48:37 +00:00
Jeffrey Yasskin
c3273dca48
Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
...
DEBUG_RUNTIME.
llvm-svn: 82906
2009-09-27 17:47:29 +00:00
Dan Gohman
2aab867048
Fix SCEVExpander's canonical addrec expansion code to work on loops that
...
aren't in canonical loop-simplify form, since it doesn't itself depend
on LoopSimplify. This means handling loops without preheaders and loops
with multiple backedges.
llvm-svn: 82905
2009-09-27 17:46:40 +00:00
Dan Gohman
bb85dd6f33
Add dominates and releaseMemory member functions to PostDominatorTree.
...
llvm-svn: 82904
2009-09-27 17:39:12 +00:00
Dan Gohman
0e70af36c0
Grab an LLVM Context from an instruction that exists rather than one
...
that is deleted in some situations. This fixes a use-after-free.
llvm-svn: 82903
2009-09-27 16:10:30 +00:00
Dan Gohman
e28bd65aed
Clarify a comment.
...
llvm-svn: 82902
2009-09-27 15:41:19 +00:00
Dan Gohman
fc20b67e80
Tell ScalarEvolution to forget everything it knows about a loop before
...
rotating the loop, since loop rotation is a very significant change.
llvm-svn: 82901
2009-09-27 15:37:03 +00:00
Dan Gohman
4338f905b7
Micro-optimize DerivedType::dropAllTypeUses.
...
llvm-svn: 82900
2009-09-27 15:32:21 +00:00
Dan Gohman
6daa565cf9
Instead of testing whether an instruction dominates the loop preheader,
...
test whether it properly dominates the loop header. This is equivalent
when the loop has a preheader, and has the advantage of working when
the loop doesn't have a preheader. Since IVUsers doesn't Require
LoopSimplify, the loop isn't guaranteed to have a preheader.
llvm-svn: 82899
2009-09-27 15:30:00 +00:00
Dan Gohman
f39a3a9288
Add a properlyDominates member function to ScalarEvolution.
...
llvm-svn: 82898
2009-09-27 15:26:03 +00:00
Dan Gohman
0523507a2f
Remove a redundant #include.
...
llvm-svn: 82897
2009-09-27 15:21:52 +00:00
Torok Edwin
819d15c7d9
Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
...
in RegisterStatistic.
llvm-svn: 82896
2009-09-27 11:08:03 +00:00
Evan Cheng
a6b9cab822
Enable pre-regalloc load / store multiple pass for Thumb2.
...
llvm-svn: 82893
2009-09-27 09:46:04 +00:00
Chris Lattner
5e0c74780a
rename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
...
llvm-svn: 82892
2009-09-27 08:01:44 +00:00
Chris Lattner
8879e06d0a
implement and document support for filecheck variables. This
...
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.
Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.
llvm-svn: 82891
2009-09-27 07:56:52 +00:00
Nick Lewycky
14d1cccc2b
Remove dead code from this function and optimize. Update its corresponding
...
LangRef entry too.
llvm-svn: 82890
2009-09-27 07:55:32 +00:00
Nick Lewycky
42fb7452df
Instruction::clone does not need to take an LLVMContext&. Remove that and
...
update all the callers.
llvm-svn: 82889
2009-09-27 07:38:41 +00:00
Nick Lewycky
b56e1ab033
Filecheckify this one test.
...
llvm-svn: 82888
2009-09-27 06:25:05 +00:00
Nick Lewycky
147d40d4a2
Leave a pointer to the documentation so that people don't end up change one but
...
not the other in the future.
llvm-svn: 82887
2009-09-27 04:57:35 +00:00
Nick Lewycky
f32f698919
Correct the version numbers to match those actually tested for by
...
autoconf/AutoRegen.sh.
llvm-svn: 82886
2009-09-27 04:56:27 +00:00
Nick Lewycky
84a1eeb7ed
Move the integer type out of 'derived' and into 'primitive'. This permits us
...
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.
Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).
llvm-svn: 82884
2009-09-27 00:45:11 +00:00
Chris Lattner
37d8015dc1
remove support for "NoSub" from regex. It seems like a minor optimization
...
and makes the API more annoying. Add a Regex::getNumMatches() method.
llvm-svn: 82877
2009-09-26 21:27:04 +00:00
Torok Edwin
fd5438edee
Speed up clang-only link, by really linking only clang, and not the unittests
...
too.
llvm-svn: 82873
2009-09-26 20:18:58 +00:00
Evan Cheng
cf2a9c9962
Remove this test.
...
llvm-svn: 82869
2009-09-26 18:51:37 +00:00
Dan Gohman
62995c71a2
Fix SimplifyLibCalls to transfer attributes from callees rather than
...
calls, since direct calls don't always reflect the attributes of their
callees.
llvm-svn: 82867
2009-09-26 18:10:13 +00:00
Dan Gohman
5bafe38916
Fix a case where ScalarEvolution was expanding pointer arithmetic
...
to inttoptr/ptrtoint unnecessarily.
llvm-svn: 82864
2009-09-26 16:11:57 +00:00
Duncan Sands
129de48982
For the NSWSub support in the builder to actually be useable,
...
there need to be corresponding changes to the constant folders,
done in this patch.
llvm-svn: 82862
2009-09-26 15:35:35 +00:00
Dan Gohman
832800aa6f
Convert comparisons like (x == infinity) to (x >= infinity) on targets
...
where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.
llvm-svn: 82861
2009-09-26 15:24:17 +00:00
Duncan Sands
8c0fb28992
Add methods for creating NSW subtraction, as already exists
...
for addition.
llvm-svn: 82860
2009-09-26 15:21:48 +00:00
Dan Gohman
534ad04302
Add a comment describing natural loops.
...
llvm-svn: 82859
2009-09-26 15:09:53 +00:00
Daniel Dunbar
ccde96e96b
"Update" tests for -disable-if-conversion removal. I think branch.ll should just
...
be removed, but I XFAIL'd it for now.
llvm-svn: 82847
2009-09-26 05:29:36 +00:00
Evan Cheng
6a3bdd872c
Really remove this option.
...
llvm-svn: 82838
2009-09-26 02:49:49 +00:00