Evan Cheng
3b245876c0
When the scheduler unfold a load folding instruction it move some of the predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit.
...
rdar://7604000
llvm-svn: 95339
2010-02-05 01:27:11 +00:00
Bill Wendling
6510dc8dc3
An empty global constant (one of size 0) may have a section immediately
...
following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:
.zerofill __DATA, __common, __cmd, 1, 3
This fix puts us back to that semantic.
llvm-svn: 95336
2010-02-05 00:17:02 +00:00
Evan Cheng
0a4fa4ca93
Fix typo Duncan noticed.
...
llvm-svn: 95322
2010-02-04 19:07:06 +00:00
Jakob Stoklund Olesen
c7c89b8325
Fix small bug in handling instructions with more than one implicitly defined operand.
...
ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.
llvm-svn: 95319
2010-02-04 18:46:28 +00:00
Evan Cheng
01676f9ff4
It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).
...
llvm-svn: 95282
2010-02-04 02:45:02 +00:00
Devang Patel
d231689adb
Emit appropriate expression to find virtual base offset.
...
llvm-svn: 95242
2010-02-03 20:08:48 +00:00
Devang Patel
999b499024
Provide interface to identifiy artificial methods.
...
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Chris Lattner
082f484074
make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
...
of const ones. non-const ones aren't very useful, because you can't
even, say, emit them.
llvm-svn: 95205
2010-02-03 06:18:30 +00:00
Chris Lattner
edcf065a29
change addPassesToEmitFile to return true on failure instead of its input,
...
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.
llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Evan Cheng
27a41d5473
Revert 94937 and move the noreturn check to codegen.
...
llvm-svn: 95198
2010-02-03 03:55:59 +00:00
Evan Cheng
40905b4302
Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.
...
llvm-svn: 95195
2010-02-03 03:28:02 +00:00
Chris Lattner
0b78cc2af5
don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
...
.o files don't like that.
llvm-svn: 95187
2010-02-03 01:49:49 +00:00
Chris Lattner
f1866ab682
privatize a bunch of methods and move \n printing into them.
...
llvm-svn: 95186
2010-02-03 01:46:05 +00:00
Dale Johannesen
a466692552
Reapply 95050 with a tweak to check the register class.
...
llvm-svn: 95183
2010-02-03 01:40:33 +00:00
Chris Lattner
996ec840d0
rejigger the world so that EmitInstruction prints the \n at
...
the end of the instruction instead of expecting the caller to
do it. This currently causes the asm-verbose instruction
comments to be on the next line.
llvm-svn: 95178
2010-02-03 01:09:55 +00:00
Chris Lattner
41ad1905c9
sink handling of target-independent machine instrs (other
...
than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp
file. This allows elimination of the
NO_ASM_WRITER_BOILERPLATE hack among other things.
llvm-svn: 95177
2010-02-03 01:00:52 +00:00
Chris Lattner
249453fff0
pass an instprinter into the AsmPrinter if it is available.
...
llvm-svn: 95168
2010-02-03 00:29:55 +00:00
Chris Lattner
d111bd518d
make any use of the "O" stream in asmprinter print to
...
stderr if in filetype=obj mode. This is a hack, and will
live until dwarf emission and other random stuff that is
not yet going through MCStreamer is upgraded. It only
impacts filetype=obj mode.
llvm-svn: 95166
2010-02-03 00:22:02 +00:00
Chris Lattner
8856a67e41
Hook up -filetype=obj through the MachO streamer. Here's a demo:
...
$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g
There is still a ton of work left. Instructions are not being encoded
yet apparently.
llvm-svn: 95162
2010-02-02 23:57:42 +00:00
Evan Cheng
6f36a083ef
Revert 95130.
...
llvm-svn: 95160
2010-02-02 23:55:14 +00:00
Chris Lattner
c49f8c7456
use OwningPtr and factor code better.
...
llvm-svn: 95156
2010-02-02 23:45:17 +00:00
Chris Lattner
b0d44c3807
refactor code so that LLVMTargetMachine creates the asmstreamer and
...
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.
llvm-svn: 95155
2010-02-02 23:37:42 +00:00
Chris Lattner
530c72a65d
simplify getVerboseAsm
...
llvm-svn: 95153
2010-02-02 22:58:13 +00:00
Chris Lattner
32445d300f
move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options.
...
llvm-svn: 95152
2010-02-02 22:54:51 +00:00
Chris Lattner
f8928453bc
remove dead #include, stupid symlinks.
...
llvm-svn: 95150
2010-02-02 22:37:42 +00:00
Chris Lattner
919b97436e
Remove a bunch of stuff around the edges of the ELF writer.
...
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(
llvm-svn: 95148
2010-02-02 22:31:11 +00:00
Evan Cheng
c1b0116ff1
Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
...
llvm-svn: 95130
2010-02-02 21:29:10 +00:00
Chris Lattner
f0cb12acf2
eliminate FileModel::Model, just use CodeGenFileType. The client
...
of the code generator shouldn't care what object format a target
uses.
llvm-svn: 95124
2010-02-02 21:06:45 +00:00
Chris Lattner
03dc0f7077
eliminate all forms of addPassesToEmitMachineCode except
...
the one used by the JIT. Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator. Inline the remaining version of
addPassesToEmitFileFinish into its only caller.
llvm-svn: 95109
2010-02-02 19:14:27 +00:00
Dale Johannesen
da431c76fb
Test revert 95050; there's a good chance it's causing
...
buildbot failure.
llvm-svn: 95103
2010-02-02 18:52:56 +00:00
Chris Lattner
2fdf5b535e
Inline addAssemblyEmitter into its one real caller and delete
...
the -print-emitted-asm option. The JIT shouldn't have to pull
in the asmprinter.
llvm-svn: 95100
2010-02-02 18:44:12 +00:00
Devang Patel
057c642486
Apparently gdb is not amused by empty lines in pubtypes section.
...
llvm-svn: 95064
2010-02-02 03:47:27 +00:00
Devang Patel
6d404adc1b
NULL terminate name in pubtypes sections.
...
llvm-svn: 95062
2010-02-02 03:37:03 +00:00
Dale Johannesen
c84816a62e
Make local RA smarter about reusing input register of a copy
...
as output. Needed for (functional) correctness in inline asm,
and should be generally beneficial. 7361612.
llvm-svn: 95050
2010-02-02 02:08:02 +00:00
Daniel Dunbar
13ad81bd70
Update CMake.
...
llvm-svn: 95041
2010-02-02 01:12:20 +00:00
Nate Begeman
0b810279c8
Kill the Mach-O writer, and temporarily make filetype=obj an error.
...
The MCStreamer based assemblers will take over for this functionality.
llvm-svn: 95033
2010-02-01 23:56:58 +00:00
Mon P Wang
d74e0023c5
Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan
...
llvm-svn: 95012
2010-02-01 22:15:09 +00:00
Chris Lattner
f5edeebd8c
eliminate a bunch of pointless LLVMContext arguments.
...
llvm-svn: 95001
2010-02-01 20:48:08 +00:00
Dale Johannesen
0b30cfc57e
fix PR 6157. Testcase pending.
...
llvm-svn: 94996
2010-02-01 19:54:53 +00:00
Mon P Wang
72c60c73af
Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result
...
type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can
be used to extended the width of an integer type. This fixes a bug for
Generic/vector-casts.ll on a ppc750.
llvm-svn: 94990
2010-02-01 19:03:18 +00:00
Devang Patel
160c92dd19
Emit declaration DIE for the class static variables.
...
llvm-svn: 94870
2010-01-30 01:08:30 +00:00
Dale Johannesen
e057403835
Fix a case where debug_value could affect codegen.
...
llvm-svn: 94866
2010-01-30 00:57:47 +00:00
Devang Patel
aedd6f5b33
Add size and location info in DW_TAG_class_type descriptor.
...
llvm-svn: 94822
2010-01-29 18:34:58 +00:00
Duncan Sands
3327498095
Change the SREM case to match the logic in the IR version ComputeMaskedBits.
...
llvm-svn: 94805
2010-01-29 09:45:26 +00:00
Bill Wendling
954cb187e0
Assign the ordering of SDNodes in a much less intrusive fashion. After the
...
"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.
llvm-svn: 94757
2010-01-28 21:51:40 +00:00
Chris Lattner
c968f4475e
add target hooks for emitting random gunk before and after the function body.
...
llvm-svn: 94732
2010-01-28 01:58:58 +00:00
Jim Grosbach
54c0530834
Update of 94055 to track the IR level call site information via an intrinsic.
...
This allows code gen and the exception table writer to cooperate to make sure
landing pads are associated with the correct invoke locations.
llvm-svn: 94726
2010-01-28 01:45:32 +00:00
Chris Lattner
73de5fbfc3
Give AsmPrinter the most common expected implementation of
...
runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define
runOnMachineFunction.
llvm-svn: 94722
2010-01-28 01:28:58 +00:00
Chris Lattner
565896b9eb
emit a 0 byte instead of a noop if a function is empty on darwin.
...
"0" is nice and target independent.
llvm-svn: 94718
2010-01-28 01:06:32 +00:00
Chris Lattner
94a946cac4
Remove the argument from EmitJumpTableInfo, because it doesn't need it.
...
Move the X86 implementation of function body emission up to
AsmPrinter::EmitFunctionBody, which works by calling the virtual
EmitInstruction method.
llvm-svn: 94716
2010-01-28 01:02:27 +00:00