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
Eric Christopher [Fri, 29 Apr 2011 00:07:20 +0000 (00:07 +0000)]
Update comments and checks to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130464
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Apr 2011 00:03:10 +0000 (00:03 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130463
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 23:55:14 +0000 (23:55 +0000)]
Revert r130454; apparently this doesn't actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130462
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 23:12:24 +0000 (23:12 +0000)]
Fix runline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130455
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 23:03:25 +0000 (23:03 +0000)]
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@130454
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 28 Apr 2011 22:48:14 +0000 (22:48 +0000)]
Preserve line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130450
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 28 Apr 2011 22:26:05 +0000 (22:26 +0000)]
Coalesce some DEBUGs (moving an only-used-in-DEBUG variable's declaration into the DEBUG)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130448
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Apr 2011 21:38:51 +0000 (21:38 +0000)]
We require threse bits to be zero, too.
This shouldn't happen in practice because the icmp would be a constant.
Add a check so we don't miscompile code if something goes wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130446
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 28 Apr 2011 21:35:49 +0000 (21:35 +0000)]
Only read *predecessor once so as to fix a theoretical issue where it changes
between two reads (threading).
Fix an off-by-one in the indirect counter table that I meant to revert after an
earlier experiment. Whoops!
Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet.
Fix an off-by-one in string emission. Extra whoops!
Tolerate DISubprograms that have null Function*'s attached to them. I don't yet
understand what this means, but it happens when you have a global static with
a non-trivial constructor/destructor.
Fix a crash on switch statements with a single successor (default-only).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130443
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 28 Apr 2011 21:23:31 +0000 (21:23 +0000)]
Target/X86/MC: Add an option for disabling arith relaxation, for my own testing
purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130438
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 21:04:39 +0000 (21:04 +0000)]
Add the getExprForFDESymbol method that responsible for computing the
expressions used in the FDE to refer to symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130437
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 28 Apr 2011 20:46:18 +0000 (20:46 +0000)]
Beautify debug info probe output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130435
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 28 Apr 2011 20:34:18 +0000 (20:34 +0000)]
Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130432
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 28 Apr 2011 20:32:02 +0000 (20:32 +0000)]
Remove DbgDeclare only if all uses are converted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130431
91177308-0d34-0410-b5e6-
96231b3b80d8
Lenny Maiorani [Thu, 28 Apr 2011 20:20:12 +0000 (20:20 +0000)]
Remove bounded StringRef::compare() since nothing but Clang SA was using it and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130430
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 20:19:12 +0000 (20:19 +0000)]
fast-isel sret calls, try 2. We actually do need to do something on x86-32. rdar://problem/
9303592 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130429
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Apr 2011 20:09:57 +0000 (20:09 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 20:02:57 +0000 (20:02 +0000)]
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130426
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 28 Apr 2011 18:43:39 +0000 (18:43 +0000)]
Do not lose line number info while eliminating tail call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130419
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 18:20:24 +0000 (18:20 +0000)]
Actually revert r130348 correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130418
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 18:15:47 +0000 (18:15 +0000)]
final step needed to resolve PR6627, which allows us to flatten the code down to
a nice and tidy:
%x1 = load i32* %0, align 4
%1 = icmp eq i32 %x1,
1179403647
br i1 %1, label %if.then, label %if.end
instead of doing lots of loads and branches. May the FreeBSD bootloader
long fit in its allocated space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 18:08:21 +0000 (18:08 +0000)]
code cleanups only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130414
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 Apr 2011 18:06:10 +0000 (18:06 +0000)]
Revert r130348; causing buildbot issues on x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130412
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 28 Apr 2011 17:51:45 +0000 (17:51 +0000)]
Fix a bug in tblgen that caused incorrect encodings on instructions that specified operands with "bit" instead of "bits<1>".
Unfortunately, my only testcase for this is fragile, and the ARM AsmParser can't round trip the instruction in question.
<rdar://problem/
9345702>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130410
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 28 Apr 2011 17:41:38 +0000 (17:41 +0000)]
Add command line option to print debug info in human readable form as comment in llvm IR output. This, i.e -enable-debug-info-comment, is very useful if you want to easily find out which optimization pass is losing line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130409
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 28 Apr 2011 17:30:04 +0000 (17:30 +0000)]
Reapply r130340: Fix for PR9730.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130408
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Apr 2011 16:58:40 +0000 (16:58 +0000)]
InstCombine: Merge "(trunc x) == C1 & (and x, CA) == C2" into a single and+icmp.
This happens when GVN widens loads. Part of PR6627.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130405
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 Apr 2011 16:52:09 +0000 (16:52 +0000)]
Be more layout aware here and swap the successor and branch condition
if it means we get a fallthrough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 16:36:48 +0000 (16:36 +0000)]
centralize "marking for deletion" into a helper function. Pass GVN around to
static functions instead of passing around tons of random ivars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 16:18:52 +0000 (16:18 +0000)]
Promote toErase to be an ivar of the GVN class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130401
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 16:09:09 +0000 (16:09 +0000)]
Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
converting the symbol passed to .cfi_personality into bytes is the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130400
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 12:50:37 +0000 (12:50 +0000)]
Mark the EH symbol global or weak if the corresponding function is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130397
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 28 Apr 2011 09:12:47 +0000 (09:12 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Apr 2011 08:37:18 +0000 (08:37 +0000)]
Fix the last -Wnon-pod-memset I'm seeing. This is benign, but appears
a bit more sinister as the memset doesn't do what the constructor does.
There seems to be a cleaner solution than a cast here though, instead we
can point the memset destination into the union its actually trying to
clear.
An alternative is to point to the Untyped member of this union. Review
appreciated, and if that is cleaner I'm happy to switch. All of these
should be functionally equivalent to the original code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Apr 2011 08:18:22 +0000 (08:18 +0000)]
Revert an unintended commit. Very sorry for this one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Apr 2011 08:17:08 +0000 (08:17 +0000)]
Fix more -Wnon-pod-memset warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130392
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Apr 2011 08:17:05 +0000 (08:17 +0000)]
nuke gold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130391
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 07:29:08 +0000 (07:29 +0000)]
teach GVN to widen integer loads when they are overaligned, when doing an
wider load would allow elimination of subsequent loads, and when the wider
load is still a native integer type. This eliminates a ton of loads on
various benchmarks involving struct fields, though it is somewhat hobbled
by clang not being very aggressive about field alignment.
This is yet another step along the way towards resolving PR6627.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130390
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 Apr 2011 05:49:04 +0000 (05:49 +0000)]
Let the immediate leaf pattern take transforms and switch the signed
immediate patterns in arm to using the pattern.
Handles rdar://
9299434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Apr 2011 05:33:16 +0000 (05:33 +0000)]
move PR9803 to this readme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130385
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 28 Apr 2011 04:52:57 +0000 (04:52 +0000)]
Add utility method to DenseMap to return the amount of memory used for its buckets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130382
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 04:04:14 +0000 (04:04 +0000)]
Add a small temporary hack for producing identical eh_frame sections on OS X.
This removes one of the main advantages of moving eh_frame to MC, but
makes the transition a lot easier to debug (run md5).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130379
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 03:26:11 +0000 (03:26 +0000)]
Produce the EH_frame# symbols if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130378
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Apr 2011 02:46:42 +0000 (02:46 +0000)]
Forward isFunctionEHFrameSymbolPrivate. If it is false, produce the foo.eh
symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130375
91177308-0d34-0410-b5e6-
96231b3b80d8