Evan Cheng
bc94b6f1fd
Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.
...
llvm-svn: 101167
2010-04-13 20:21:05 +00:00
Jakob Stoklund Olesen
a75eedea38
Teach MachineSinking to handle easy critical edges.
...
Sometimes it is desirable to sink instructions along a critical edge:
x = ...
if (a && b) ...
else use(x);
The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.
llvm-svn: 101165
2010-04-13 19:06:14 +00:00
Evan Cheng
d83c1b5a0e
Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.
...
llvm-svn: 101154
2010-04-13 18:16:00 +00:00
Dan Gohman
a400b6eca8
Add a few comments.
...
llvm-svn: 101148
2010-04-13 17:07:06 +00:00
Dan Gohman
2bca857d78
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.
llvm-svn: 101147
2010-04-13 16:57:55 +00:00
Dan Gohman
80b52785a4
Rename MachineFrameInfo variables to MFI, for consistency with
...
the rest of CodeGen.
llvm-svn: 101146
2010-04-13 16:56:45 +00:00
Dan Gohman
22f72726f3
Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
...
llvm-svn: 101145
2010-04-13 16:55:37 +00:00
Dan Gohman
9652ec03e5
Delete an unused member variable.
...
llvm-svn: 101143
2010-04-13 16:51:39 +00:00
Chris Lattner
dabcd9738c
add llvm codegen support for -ffunction-sections and -fdata-sections,
...
patch by Sylvere Teissier!
llvm-svn: 101106
2010-04-13 00:36:43 +00:00
Dan Gohman
3646979c2c
Remove a #include.
...
llvm-svn: 101043
2010-04-12 16:26:03 +00:00
Benjamin Kramer
9904b07b61
Plug trivial leak.
...
llvm-svn: 101034
2010-04-12 11:38:35 +00:00
Evan Cheng
90788354c9
Enable post regalloc machine licm by default.
...
llvm-svn: 101023
2010-04-12 06:25:28 +00:00
Dan Gohman
5c9f7ed9aa
Remove unnecessary parens.
...
llvm-svn: 101010
2010-04-12 02:24:01 +00:00
Bob Wilson
c340ffd866
Tidy whitespace.
...
llvm-svn: 100904
2010-04-09 21:38:26 +00:00
Devang Patel
55172d3571
Clear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.
...
llvm-svn: 100867
2010-04-09 16:04:20 +00:00
Dan Gohman
f9cf2772f6
Delete this obsolete comment.
...
llvm-svn: 100858
2010-04-09 14:12:01 +00:00
Chandler Carruth
362be7d46d
Add a missing dependency to this library when building with CMake.
...
llvm-svn: 100852
2010-04-09 05:55:25 +00:00
Bob Wilson
1fa38ca6fd
Use getNumImplicitDefs() and getNumImplicitUses().
...
llvm-svn: 100850
2010-04-09 04:46:43 +00:00
Bob Wilson
ed50c79a3a
Fix up some comments.
...
llvm-svn: 100849
2010-04-09 04:34:03 +00:00
Dan Gohman
127f5c53e1
Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
...
llvm-svn: 100824
2010-04-08 23:03:40 +00:00
Chris Lattner
e154403f78
delete a forwarding function.
...
llvm-svn: 100815
2010-04-08 21:34:17 +00:00
Chris Lattner
1cf4bded13
move elf section uniquing to MCContext. Along the way
...
merge XCore's section into MCSectionELF
llvm-svn: 100812
2010-04-08 21:26:26 +00:00
Chris Lattner
0225dbbfee
remove the TargetLoweringObjectFileMachO::getMachoSection
...
api and update clients to use MCContext instead.
llvm-svn: 100808
2010-04-08 20:40:11 +00:00
Chris Lattner
60ff59e5c1
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.
llvm-svn: 100807
2010-04-08 20:30:37 +00:00
Evan Cheng
619f1b8a94
Coalescer should not delete copy instructions whose defs are partially dead. e.g.
...
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>
llvm-svn: 100804
2010-04-08 20:02:37 +00:00
Ted Kremenek
141d32b7e9
Fix -Wsign-compare warning (issued by clang++).
...
llvm-svn: 100799
2010-04-08 18:49:30 +00:00
Devang Patel
17b5b1dd88
Rename a function.
...
llvm-svn: 100797
2010-04-08 18:43:56 +00:00
Chris Lattner
f6e9c0c4bd
implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.
...
llvm-svn: 100792
2010-04-08 18:20:52 +00:00
Devang Patel
89756fdbfc
One instruction may start (or end) multiple lexical scopes.
...
There is no need to remember labels identifying regions marked by such instructions in each scope.
llvm-svn: 100781
2010-04-08 16:50:29 +00:00
Devang Patel
3cc4a24666
Remove dead code.
...
llvm-svn: 100771
2010-04-08 15:48:02 +00:00
Devang Patel
b9f9a00513
Delete out of date comment.
...
llvm-svn: 100769
2010-04-08 15:41:13 +00:00
Devang Patel
9ada7b28a2
Refactor.
...
llvm-svn: 100768
2010-04-08 15:37:09 +00:00
Benjamin Kramer
0fb23008bb
Use twines to simplify calls to report_fatal_error. For code size and readability.
...
llvm-svn: 100756
2010-04-08 10:44:28 +00:00
Evan Cheng
3fa0b6fb03
Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
...
llvm-svn: 100751
2010-04-08 07:37:57 +00:00
Evan Cheng
2f7cee1730
Make post regalloc machine licm functional. It now passes all of MultiSource.
...
llvm-svn: 100742
2010-04-08 01:03:47 +00:00
Chris Lattner
579e7eb423
convert a report_fatal_error that I was able to trigger into a nice error
...
so the user at least knows what inline asm is a problem. For example:
error: inline asm not supported yet: don't know how to handle tied indirect register inputs
pr8788-1.c:14:10: note: generated from here
asm ("\n" : "+r" (stack->regs)
^
Instead of:
fatal error: error in backend: Don't know how to handle tied indirect register inputs yet!
llvm-svn: 100731
2010-04-08 00:09:16 +00:00
Chris Lattner
f9fbc74e40
minor tidying.
...
llvm-svn: 100725
2010-04-07 23:50:38 +00:00
Chris Lattner
96ed85d7ab
use assertions instead of unreachable for logic errors.
...
llvm-svn: 100724
2010-04-07 23:47:51 +00:00
Chris Lattner
393ea6fc22
introduce a new recoverable error handling API to LLVMContext
...
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:
$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>
Now we generate this:
$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.
This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)
llvm-svn: 100723
2010-04-07 23:40:44 +00:00
Chris Lattner
80b41881bc
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
0768c834fe
remove some unneeded errorhandling stuff.
...
llvm-svn: 100703
2010-04-07 22:44:07 +00:00
Chris Lattner
cc827ee016
tidy up
...
llvm-svn: 100700
2010-04-07 22:29:10 +00:00
Anton Korobeynikov
e5c1563130
Remove late ARM codegen optimization pass committed by accident.
...
It is not ready for public yet.
llvm-svn: 100673
2010-04-07 18:23:27 +00:00
Anton Korobeynikov
f93145e685
Initial support for different kinds of FU reservation.
...
llvm-svn: 100645
2010-04-07 18:19:32 +00:00
Anton Korobeynikov
bf7bbe3e94
Factor out scoreboard into separate class. This way we might have several different score boards.
...
llvm-svn: 100644
2010-04-07 18:19:24 +00:00
Anton Korobeynikov
d873a16430
Add hook to insert late LLVM=>LLVM passes just before isel
...
llvm-svn: 100640
2010-04-07 18:18:42 +00:00
Chris Lattner
f520500a06
fix 80 col violation, patch by Alastair Lynn
...
llvm-svn: 100639
2010-04-07 18:13:33 +00:00
Chris Lattner
7816ae8fd0
add a comment line that got dropped
...
llvm-svn: 100638
2010-04-07 18:10:38 +00:00
Chris Lattner
60e5f55565
fix a latent bug my inline asm stuff exposed:
...
MachineOperand::isIdenticalTo wasn't handling metadata operands.
llvm-svn: 100636
2010-04-07 18:03:19 +00:00
Benjamin Kramer
389c863692
Remove unused method.
...
llvm-svn: 100620
2010-04-07 11:23:46 +00:00