Benjamin Kramer [Tue, 3 May 2011 16:00:27 +0000 (16:00 +0000)]
Remove unused variables caught by GCC's -Wunused-but-set-variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130755
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 3 May 2011 15:56:16 +0000 (15:56 +0000)]
Pass --disable-cfi to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130754
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 3 May 2011 03:42:50 +0000 (03:42 +0000)]
Add pentium{3,4}m cpus. Patch by Alexander Best!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130749
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 3 May 2011 01:28:32 +0000 (01:28 +0000)]
xmm0 is an implicit parameter in this and so shouldn't be in the
string template.
Fixes rdar://
8493866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130747
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 3 May 2011 00:46:49 +0000 (00:46 +0000)]
Add an unfolded offset field to LSR's Formula record. This is used to
model constants which can be added to base registers via add-immediate
instructions which don't require an additional register to materialize
the immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130743
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 2 May 2011 22:25:45 +0000 (22:25 +0000)]
Other parts of the SelectionDAG framework assume that targets use their pointer type for vector indices. Make the vector unrolling code respect that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130733
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 2 May 2011 21:57:00 +0000 (21:57 +0000)]
Scanning entire basic block may be too expensive in terms of compile time. Instead, just use whatever location info first non-phi instruction has.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130729
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 2 May 2011 20:36:53 +0000 (20:36 +0000)]
Handle <def,undef> in the second loop as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130718
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 2 May 2011 20:16:33 +0000 (20:16 +0000)]
Apparently the check for direct calls is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130716
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 2 May 2011 20:06:30 +0000 (20:06 +0000)]
Use the PrintReg adaptor to correctly print live-in registers in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130715
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 2 May 2011 20:06:28 +0000 (20:06 +0000)]
Only ignore <undef> use operands, keep the <def,undef> ops.
Def operands may also have an <undef> flag, but that just means that a
sub-register redef doesn't actually read the super-register. For physical
registers, it has no meaning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130714
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 19:51:34 +0000 (19:51 +0000)]
Pass -disable-cfi to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130713
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 19:45:24 +0000 (19:45 +0000)]
llvmc: Pass -disable-cfi to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130712
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 2 May 2011 18:51:41 +0000 (18:51 +0000)]
Fix PR9579: when simplifying a compare to "true" or "false", and it was
a vector compare, generate a vector result rather than i1 (and crashing).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130706
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 2 May 2011 18:41:29 +0000 (18:41 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130705
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 2 May 2011 18:19:17 +0000 (18:19 +0000)]
Emit debug info for global variables first.
This works around a limitation in gdb which is reported by following inherit.exp test failures from gdb testsuite.
gdb.cp/inherit.exp: print g_vB.vB::vb
gdb.cp/inherit.exp: print g_vB.vB::vx
gdb.cp/inherit.exp: print g_vC.vC::vc
gdb.cp/inherit.exp: print g_vC.vC::vx
gdb.cp/inherit.exp: print g_vD.vB::vb
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130702
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 2 May 2011 16:34:19 +0000 (16:34 +0000)]
Forgot to commit the changes to this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130695
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 2 May 2011 16:27:02 +0000 (16:27 +0000)]
Move some rem transforms out of instcombine and into instsimplify.
This automagically provides a transform noticed by my super-optimizer
as occurring quite often: "rem x, (select cond, x, 1)" -> 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130694
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 15:58:16 +0000 (15:58 +0000)]
Add 130690 back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130693
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 15:49:52 +0000 (15:49 +0000)]
Only produce the eh_frame section if we have at least one personality function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130692
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 15:42:31 +0000 (15:42 +0000)]
Revert while I debug the tests that use march but not mtriple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130691
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 2 May 2011 15:00:52 +0000 (15:00 +0000)]
Move ppc OS X to cfi too. I am building it on an old ppc mini, but it will take some time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 May 2011 05:49:01 +0000 (05:49 +0000)]
Remove an unused variable in NDEBUG (found with -Wunused-variable).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130688
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 2 May 2011 05:29:58 +0000 (05:29 +0000)]
Minimize the slot indexes spanned by register ranges created when splitting.
When an interfering live range ends at a dead slot index between two
instructions, make sure that the inserted copy instruction gets a slot index
after the dead ones. This makes it possible to avoid the interference.
Ideally, there shouldn't be interference ending at a deleted instruction, but
physical register coalescing can sometimes do that to sub-registers.
This fixes PR9823.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130687
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 2 May 2011 05:29:56 +0000 (05:29 +0000)]
Add a SlotIndexes::insertMachineInstrInMaps to insert the instruction after any null indexes.
This makes a difference if a live interval is referring to a deleted
instruction. It can be important to insert an instruction before or after a
deleted instruction to avoid interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130686
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 2 May 2011 05:24:47 +0000 (05:24 +0000)]
In option typo correction, consider -foo=VALUE flags as two distinct parts. The
comments claimed it did this, but the LHS value was actually an unused variable.
The new system considers only the '-foo' part when comparing it for typos
against flags that have values, but still look at the whole string for flags
that don't. That way, we'll still correct '-inst=combine' to '-instcombine'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130685
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 2 May 2011 05:05:29 +0000 (05:05 +0000)]
Remove dead variable pointed out by GCC 4.6 warnings, and reflow this a little
to scope a variable more tightly per llvm coding style. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 May 2011 18:27:11 +0000 (18:27 +0000)]
enhance memcpyopt to obey -fno-builtin and friends. This addresses a
problem reported on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130661
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 1 May 2011 15:44:13 +0000 (15:44 +0000)]
Add r130623 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130658
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 1 May 2011 13:29:49 +0000 (13:29 +0000)]
Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 1 May 2011 06:14:10 +0000 (06:14 +0000)]
Remove an unused variable from this function introduced in r130637,
likely a result of copy/paste.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130640
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 1 May 2011 04:49:54 +0000 (04:49 +0000)]
GCC uses a different encoding of pointers in the FDE when using
-fno-dwarf2-cfi-asm. Implement the same behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130637
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 1 May 2011 04:19:24 +0000 (04:19 +0000)]
I forgot these files in the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130635
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 1 May 2011 03:50:49 +0000 (03:50 +0000)]
Simplify the handling of pcrel relocations on ELF. Now we do the right thing
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.
This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 1 May 2011 02:12:20 +0000 (02:12 +0000)]
Update instructions: LLVM.cmake is now LLVMConfig.cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130631
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 23:03:44 +0000 (23:03 +0000)]
Revert the previous patch while I figure out how to make llvm-gcc
less agressive about disabling cfi on linux :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130626
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 23:00:05 +0000 (23:00 +0000)]
X86AsmPrinter doesn't know how to handle the X86II::MO_GOT_ABSOLUTE_ADDRESS flag
after folding ADD32ri to ADD32mi, so don't do that.
This only happens when the greedy register allocator gets itself in trouble and
spills %vreg9 here:
16L %vreg9<def> = MOVPC32r 0, %ESP<imp-use>; GR32:%vreg9
48L %vreg9<def> = ADD32ri %vreg9, <es:_GLOBAL_OFFSET_TABLE_>[TF=1], %EFLAGS<imp-def,dead>; GR32:%vreg9
That should never happen, the live range should be split instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130625
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 22:29:54 +0000 (22:29 +0000)]
Enable CFI on OS X.
Currently the output should be almost identical to the one produced by CodeGen
to make the transition easier.
The only two differences I know of are:
* Some files get an extra advance loc of size 0. This will be fixed when
relaxations are enabled.
* The optimization of declaring an EH symbol as an external variable is not
implemented. This is a subset of adding the nounwind attribute, so we if really
this at -O0 we should probably do it at the IL level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130623
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 19:12:33 +0000 (19:12 +0000)]
When a physreg is live-in and live through a basic block, make sure its live
range covers the entire block.
The live range can't be terminated at a random instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130619
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Apr 2011 18:16:07 +0000 (18:16 +0000)]
InstCombine: Turn (zext A) udiv (zext B) into (zext (A udiv B)). Same for urem or constant B.
This obviously helps a lot if the division would be turned into a libcall
(think i64 udiv on i386), but div is also one of the few remaining instructions
on modern CPUs that become more expensive when the bitwidth gets bigger.
This also helps register pressure on i386 when dividing chars, divb needs
two 8-bit parts of a 16 bit register as input where divl uses two registers.
int foo(unsigned char a) { return a/10; }
int bar(unsigned char a, unsigned char b) { return a/b; }
compiles into (x86_64)
_foo:
imull $205, %edi, %eax
shrl $11, %eax
ret
_bar:
movzbl %dil, %eax
divb %sil, %al
movzbl %al, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130615
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Apr 2011 18:16:00 +0000 (18:16 +0000)]
Use SimplifyDemandedBits on div instructions.
This folds away silly stuff like (a&255)/1000 -> 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130614
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Apr 2011 18:15:53 +0000 (18:15 +0000)]
FileCheckize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130613
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 16:34:57 +0000 (16:34 +0000)]
Implement MCAsmStreamer::EmitEHSymAttributes. Doing this in the asm streamer
is a bit ugly, but doing it on the base MCStreamer would be redundant
with the object streamer which does it using SD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130611
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 16:22:46 +0000 (16:22 +0000)]
Handle PrivateExtern eh symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130609
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 08:00:50 +0000 (08:00 +0000)]
Allow folded spills in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130599
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 06:42:21 +0000 (06:42 +0000)]
Avoid using stale entries form the sibling value map.
This could happen when trying to use a value that had been eliminated after dead
code elimination and folding loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130597
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 05:07:46 +0000 (05:07 +0000)]
Use hysteresis for local live range splitting as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130596
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 30 Apr 2011 03:53:56 +0000 (03:53 +0000)]
runtime/libprofile/PathProfiling.c: Don't use // comment in C source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130589
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 03:44:37 +0000 (03:44 +0000)]
Add all the plumbing needed for MC to expand cfi to the old tables in
the final assembly. It is the same technique used when targeting
assemblers that don't support .loc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130587
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Apr 2011 03:21:04 +0000 (03:21 +0000)]
Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130585
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 03:13:08 +0000 (03:13 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130582
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 01:37:54 +0000 (01:37 +0000)]
Use a greedy algorithm for allocating registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130568
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 30 Apr 2011 01:37:52 +0000 (01:37 +0000)]
Weekly fix of register allocation dependent unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130567
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 29 Apr 2011 23:45:22 +0000 (23:45 +0000)]
Print out the 'nontemporal' info on a store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130562
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 23:34:52 +0000 (23:34 +0000)]
Make FastEmit_ri_ try a bit harder to succeed for supported operations; FastEmit_i can fail for non-Thumb2 ARM. Makes ARMSimplifyAddress work correctly, and reduces the number of fast-isel bailouts on non-Thumb ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130560
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Apr 2011 23:12:01 +0000 (23:12 +0000)]
80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130558
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 22:56:48 +0000 (22:56 +0000)]
Zap a couple now-unused functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130557
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 22:48:03 +0000 (22:48 +0000)]
Switch to ImmLeaf (which can be used by FastISel) for a few more common ARM/Thumb2 patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130552
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 29 Apr 2011 22:28:59 +0000 (22:28 +0000)]
Assing line number info to new PHIs created by SSA updater.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130551
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Apr 2011 22:07:50 +0000 (22:07 +0000)]
Add FastEmitInst_ii for the arm fast isel generator. It doesn't use it, but
if it ever did it needs the def machinery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130549
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 21:58:31 +0000 (21:58 +0000)]
Filter out pattterns from the FastISel emitter which it doesn't actually know how to handle. No significant functionality change at the moment, but it's necessary for some changes I'm planning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130547
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Apr 2011 21:56:31 +0000 (21:56 +0000)]
Some cleanup and optimize fallthrough more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130546
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 21:50:57 +0000 (21:50 +0000)]
Avoid some uses of .uleb128. This is a small speedup and more importantly
lets this code be used when producing assembly code for old assemblers without
uleb support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130544
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 21:41:06 +0000 (21:41 +0000)]
Implement MCAsmStreamer::EmitCFIDefCfa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130543
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 29 Apr 2011 21:36:04 +0000 (21:36 +0000)]
Print new instructions without DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130542
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 21:33:03 +0000 (21:33 +0000)]
Fix run-line, again. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130540
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 29 Apr 2011 21:22:56 +0000 (21:22 +0000)]
Re-committing r130454, which does not in fact break anything.
Fix a rather obscure crash caused by ARM fast-isel generating code which redefines a register.
rdar://problem/
9338332 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130539
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 29 Apr 2011 20:38:55 +0000 (20:38 +0000)]
Preserve line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130536
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Apr 2011 20:02:39 +0000 (20:02 +0000)]
Add trunc->branch support, this won't help with clang's i8->i1 truncations
for bools, but is a start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130534
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:58:57 +0000 (18:58 +0000)]
win32: Include DataTypes.h instead of stdint.h to try and fix a Win32 build
issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130530
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:58:55 +0000 (18:58 +0000)]
Cleanup some DOS newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130529
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 29 Apr 2011 18:47:38 +0000 (18:47 +0000)]
SimplifyCFG: Expose phi node folding cost threshold as command line parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130528
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 29 Apr 2011 18:47:31 +0000 (18:47 +0000)]
SimplifyCFG: Add CostRemaining parameter to DominatesMergePoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130527
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 29 Apr 2011 18:47:25 +0000 (18:47 +0000)]
SimplifyCFG: Add Trunc, ZExt and SExt to the list of cheap instructions for phi node folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130526
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:20:20 +0000 (18:20 +0000)]
MCAsmLayout: Add support for computing the symbol offset of variables. Not
currently used, because variables don't get reported as being "defined".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130524
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:20:17 +0000 (18:20 +0000)]
MC: Change variable symbols to be recognized as defined, by assigning their sections based on FindAssociatedSection().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130523
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:13:42 +0000 (18:13 +0000)]
MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130522
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:10:47 +0000 (18:10 +0000)]
MC/Mach-O: Allow emission of relocations for variables in some more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130520
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:07:43 +0000 (18:07 +0000)]
MC/Mach-O: Find section ordinal's by looking at the symbol, instead of assuming they are present in a fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130519
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 29 Apr 2011 18:00:54 +0000 (18:00 +0000)]
Hoist MCLineEntry construction AsmPrinter so that anyone who derives from AsmPrinter can have line number entries.
PR 9810
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130518
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 18:00:03 +0000 (18:00 +0000)]
MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semantics
that associate sections with expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130517
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Apr 2011 17:53:11 +0000 (17:53 +0000)]
MC/AsmParser: Generalize a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130515
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 29 Apr 2011 16:57:12 +0000 (16:57 +0000)]
Fix a C++0x portability issue with std::make_pair. Explicitly providing template arguments no longer works when the call arguments are lvalues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130513
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 29 Apr 2011 16:12:17 +0000 (16:12 +0000)]
Include <pthread.h> before we use pthread_self/pthread_kill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130510
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 15:09:53 +0000 (15:09 +0000)]
The last hack for producing bit identical output with cfi on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130504
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 14:48:51 +0000 (14:48 +0000)]
Change DwarfCFIException's member variables to track what it actually
emmits: .cfi_personality, .cfi_lsda and the moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130503
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Apr 2011 14:18:15 +0000 (14:18 +0000)]
Teach Thumb2 isel to fold and->rotr ==> ROR.
Generalization of Nate Begeman's patch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130502
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 14:14:06 +0000 (14:14 +0000)]
Factor some code to needsCFIMoves. Avoid printing moves when we don't have to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130501
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 Apr 2011 14:09:57 +0000 (14:09 +0000)]
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130499
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Apr 2011 14:02:41 +0000 (14:02 +0000)]
Combine thumb2-ror tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130498
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 29 Apr 2011 09:59:12 +0000 (09:59 +0000)]
docs/doxygen.css: Tweak padding on memdoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130493
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Fri, 29 Apr 2011 08:56:07 +0000 (08:56 +0000)]
Unbreak the MSVC build:
- unistd.h doesn't exist with MSVC
- inline must be __inline in Microsoft C
- atexit cannot take a function declared as void f(), must be void f(void).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130490
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 Apr 2011 08:41:23 +0000 (08:41 +0000)]
Balance parentheses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130489
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 Apr 2011 08:15:41 +0000 (08:15 +0000)]
InstCombine: turn (C1 << A) << C2) into (C1 << C2) << A)
Fixes PR9809.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130485
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Apr 2011 05:40:18 +0000 (05:40 +0000)]
clean up after Sean's r127646 patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Apr 2011 05:24:29 +0000 (05:24 +0000)]
use the MachineInstrBuilder operator-> to simplify some code.
There are probably more instances of this floating around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Apr 2011 05:24:07 +0000 (05:24 +0000)]
add a missing operator that caused us to have to use (*MIB).foo everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130473
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 03:06:29 +0000 (03:06 +0000)]
Last bit by bit compatibility patch to MCDwarf.cpp: If a FDE with no LSDA is
assigned to a CIE that requires one, just output a 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130472
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Apr 2011 02:42:28 +0000 (02:42 +0000)]
Add an alternative implementation of CIE and FDE emission that outputs them
in the same order as the one in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130471
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 29 Apr 2011 02:12:06 +0000 (02:12 +0000)]
Rename profile_rt.so to libprofile_rt.so under configure+make (it already was
under cmake).
Add libprofile_rt.a so that we can tell clang to link against it in --coverage
mode. Also turn it on by default in cmake builds.
Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think
I've done the right thing, but please let me know (or fix and commit) if not!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130470
91177308-0d34-0410-b5e6-
96231b3b80d8