Rafael Espindola
a3181d12c6
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.
llvm-svn: 130587
2011-04-30 03:44:37 +00:00
Rafael Espindola
1d1eced025
Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.
...
llvm-svn: 130585
2011-04-30 03:21:04 +00:00
Jakob Stoklund Olesen
d50e5eb8c3
Update comment.
...
llvm-svn: 130582
2011-04-30 03:13:08 +00:00
Jakob Stoklund Olesen
6e399a6ecb
Use a greedy algorithm for allocating registers.
...
llvm-svn: 130568
2011-04-30 01:37:54 +00:00
Jakob Stoklund Olesen
edfabc9aad
Weekly fix of register allocation dependent unit tests.
...
llvm-svn: 130567
2011-04-30 01:37:52 +00:00
Bill Wendling
9f638ab181
Print out the 'nontemporal' info on a store.
...
llvm-svn: 130562
2011-04-29 23:45:22 +00:00
Eli Friedman
4105ed1523
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.
...
llvm-svn: 130560
2011-04-29 23:34:52 +00:00
Eric Christopher
e02e07c3a6
80-col.
...
llvm-svn: 130558
2011-04-29 23:12:01 +00:00
Eli Friedman
468dfabce0
Zap a couple now-unused functions.
...
llvm-svn: 130557
2011-04-29 22:56:48 +00:00
Eli Friedman
328bad02fa
Switch to ImmLeaf (which can be used by FastISel) for a few more common ARM/Thumb2 patterns.
...
llvm-svn: 130552
2011-04-29 22:48:03 +00:00
Devang Patel
a8e7411c74
Assing line number info to new PHIs created by SSA updater.
...
llvm-svn: 130551
2011-04-29 22:28:59 +00:00
Eric Christopher
7708746c33
Add FastEmitInst_ii for the arm fast isel generator. It doesn't use it, but
...
if it ever did it needs the def machinery.
llvm-svn: 130549
2011-04-29 22:07:50 +00:00
Eli Friedman
3bc13b4feb
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.
...
llvm-svn: 130547
2011-04-29 21:58:31 +00:00
Eric Christopher
26b8ac4b8c
Some cleanup and optimize fallthrough more.
...
llvm-svn: 130546
2011-04-29 21:56:31 +00:00
Rafael Espindola
6a85f9b42e
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.
llvm-svn: 130544
2011-04-29 21:50:57 +00:00
Rafael Espindola
6c961e1b75
Implement MCAsmStreamer::EmitCFIDefCfa.
...
llvm-svn: 130543
2011-04-29 21:41:06 +00:00
Devang Patel
84d7eb7252
Print new instructions without DebugLoc.
...
llvm-svn: 130542
2011-04-29 21:36:04 +00:00
Eli Friedman
dd937843d3
Fix run-line, again. :(
...
llvm-svn: 130540
2011-04-29 21:33:03 +00:00
Eli Friedman
86caced370
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 .
llvm-svn: 130539
2011-04-29 21:22:56 +00:00
Devang Patel
c1f7c1d469
Preserve line number information.
...
llvm-svn: 130536
2011-04-29 20:38:55 +00:00
Eric Christopher
8d46b47787
Add trunc->branch support, this won't help with clang's i8->i1 truncations
...
for bools, but is a start.
llvm-svn: 130534
2011-04-29 20:02:39 +00:00
Daniel Dunbar
080d98d3b2
win32: Include DataTypes.h instead of stdint.h to try and fix a Win32 build
...
issue.
llvm-svn: 130530
2011-04-29 18:58:57 +00:00
Daniel Dunbar
eeb2cbce80
Cleanup some DOS newlines.
...
llvm-svn: 130529
2011-04-29 18:58:55 +00:00
Peter Collingbourne
616044acd5
SimplifyCFG: Expose phi node folding cost threshold as command line parameter
...
llvm-svn: 130528
2011-04-29 18:47:38 +00:00
Peter Collingbourne
e3511e15e0
SimplifyCFG: Add CostRemaining parameter to DominatesMergePoint
...
llvm-svn: 130527
2011-04-29 18:47:31 +00:00
Peter Collingbourne
61f6602acd
SimplifyCFG: Add Trunc, ZExt and SExt to the list of cheap instructions for phi node folding
...
llvm-svn: 130526
2011-04-29 18:47:25 +00:00
Daniel Dunbar
72032861c6
MCAsmLayout: Add support for computing the symbol offset of variables. Not
...
currently used, because variables don't get reported as being "defined".
llvm-svn: 130524
2011-04-29 18:20:20 +00:00
Daniel Dunbar
bea7b93c88
MC: Change variable symbols to be recognized as defined, by assigning their sections based on FindAssociatedSection().
...
llvm-svn: 130523
2011-04-29 18:20:17 +00:00
Daniel Dunbar
b200f93125
MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.
...
llvm-svn: 130522
2011-04-29 18:13:42 +00:00
Daniel Dunbar
29ba55cfe4
MC/Mach-O: Allow emission of relocations for variables in some more cases.
...
llvm-svn: 130520
2011-04-29 18:10:47 +00:00
Daniel Dunbar
b9c2b6c50d
MC/Mach-O: Find section ordinal's by looking at the symbol, instead of assuming they are present in a fragment.
...
llvm-svn: 130519
2011-04-29 18:07:43 +00:00
Devang Patel
124ae13421
Hoist MCLineEntry construction AsmPrinter so that anyone who derives from AsmPrinter can have line number entries.
...
PR 9810
llvm-svn: 130518
2011-04-29 18:00:54 +00:00
Daniel Dunbar
dc3e4cc5ed
MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semantics
...
that associate sections with expressions.
llvm-svn: 130517
2011-04-29 18:00:03 +00:00
Daniel Dunbar
1bf128eaeb
MC/AsmParser: Generalize a check.
...
llvm-svn: 130515
2011-04-29 17:53:11 +00:00
Douglas Gregor
dd8061e09f
Fix a C++0x portability issue with std::make_pair. Explicitly providing template arguments no longer works when the call arguments are lvalues.
...
llvm-svn: 130513
2011-04-29 16:57:12 +00:00
Douglas Gregor
0e50682f26
Include <pthread.h> before we use pthread_self/pthread_kill
...
llvm-svn: 130510
2011-04-29 16:12:17 +00:00
Rafael Espindola
1fc5bf9fc5
The last hack for producing bit identical output with cfi on OS X.
...
llvm-svn: 130504
2011-04-29 15:09:53 +00:00
Rafael Espindola
697edc89a5
Change DwarfCFIException's member variables to track what it actually
...
emmits: .cfi_personality, .cfi_lsda and the moves.
llvm-svn: 130503
2011-04-29 14:48:51 +00:00
Andrew Trick
e794e17524
Teach Thumb2 isel to fold and->rotr ==> ROR.
...
Generalization of Nate Begeman's patch!
llvm-svn: 130502
2011-04-29 14:18:15 +00:00
Rafael Espindola
b7a012a282
Factor some code to needsCFIMoves. Avoid printing moves when we don't have to.
...
llvm-svn: 130501
2011-04-29 14:14:06 +00:00
Benjamin Kramer
6708499b6d
This is done.
...
llvm-svn: 130499
2011-04-29 14:09:57 +00:00
Andrew Trick
65266ed4d7
Combine thumb2-ror tests.
...
llvm-svn: 130498
2011-04-29 14:02:41 +00:00
NAKAMURA Takumi
2277ab2ae6
docs/doxygen.css: Tweak padding on memdoc.
...
llvm-svn: 130493
2011-04-29 09:59:12 +00:00
Francois Pichet
dbad1d1599
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).
llvm-svn: 130490
2011-04-29 08:56:07 +00:00
Benjamin Kramer
f0e3f04470
Balance parentheses.
...
llvm-svn: 130489
2011-04-29 08:41:23 +00:00
Benjamin Kramer
16f18ed7b5
InstCombine: turn (C1 << A) << C2) into (C1 << C2) << A)
...
Fixes PR9809.
llvm-svn: 130485
2011-04-29 08:15:41 +00:00
Chris Lattner
011eae7512
clean up after Sean's r127646 patch.
...
llvm-svn: 130475
2011-04-29 05:40:18 +00:00
Chris Lattner
1d0c25756e
use the MachineInstrBuilder operator-> to simplify some code.
...
There are probably more instances of this floating around.
llvm-svn: 130474
2011-04-29 05:24:29 +00:00
Chris Lattner
6d6cb40269
add a missing operator that caused us to have to use (*MIB).foo everywhere.
...
llvm-svn: 130473
2011-04-29 05:24:07 +00:00
Rafael Espindola
68067664c3
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.
llvm-svn: 130472
2011-04-29 03:06:29 +00:00
Rafael Espindola
7c7151512c
Add an alternative implementation of CIE and FDE emission that outputs them
...
in the same order as the one in CodeGen.
llvm-svn: 130471
2011-04-29 02:42:28 +00:00
Nick Lewycky
61aed87a49
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!
llvm-svn: 130470
2011-04-29 02:12:06 +00:00
Eric Christopher
9ade5e2495
Update comments and checks to match reality.
...
llvm-svn: 130464
2011-04-29 00:07:20 +00:00
Eric Christopher
501d2e2c14
Whitespace.
...
llvm-svn: 130463
2011-04-29 00:03:10 +00:00
Eli Friedman
517728b1ae
Revert r130454; apparently this doesn't actually work.
...
llvm-svn: 130462
2011-04-28 23:55:14 +00:00
Eli Friedman
37b9ede969
Fix runline.
...
llvm-svn: 130455
2011-04-28 23:12:24 +00:00
Eli Friedman
e4ecd42926
Fix a rather obscure crash caused by ARM fast-isel generating code which redefines a register.
...
rdar://problem/9338332 .
llvm-svn: 130454
2011-04-28 23:03:25 +00:00
Devang Patel
80d1d3aaec
Preserve line number information.
...
llvm-svn: 130450
2011-04-28 22:48:14 +00:00
Matt Beaumont-Gay
c99298ab5e
Coalesce some DEBUGs (moving an only-used-in-DEBUG variable's declaration into the DEBUG)
...
llvm-svn: 130448
2011-04-28 22:26:05 +00:00
Benjamin Kramer
cf9d1ad62e
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.
llvm-svn: 130446
2011-04-28 21:38:51 +00:00
Nick Lewycky
6aa79492a5
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).
llvm-svn: 130443
2011-04-28 21:35:49 +00:00
Daniel Dunbar
a86188bf8e
Target/X86/MC: Add an option for disabling arith relaxation, for my own testing
...
purposes.
llvm-svn: 130438
2011-04-28 21:23:31 +00:00
Rafael Espindola
6bd6a70837
Add the getExprForFDESymbol method that responsible for computing the
...
expressions used in the FDE to refer to symbols.
llvm-svn: 130437
2011-04-28 21:04:39 +00:00
Devang Patel
d36bdb5208
Beautify debug info probe output.
...
llvm-svn: 130435
2011-04-28 20:46:18 +00:00
Ted Kremenek
e203bbb47e
Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
...
llvm-svn: 130432
2011-04-28 20:34:18 +00:00
Devang Patel
72aa1a8a68
Remove DbgDeclare only if all uses are converted.
...
llvm-svn: 130431
2011-04-28 20:32:02 +00:00
Lenny Maiorani
367342e209
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.
...
llvm-svn: 130430
2011-04-28 20:20:12 +00:00
Eli Friedman
7cd5101ad3
fast-isel sret calls, try 2. We actually do need to do something on x86-32. rdar://problem/9303592 .
...
llvm-svn: 130429
2011-04-28 20:19:12 +00:00
Benjamin Kramer
101720fb58
Fix a comment.
...
llvm-svn: 130428
2011-04-28 20:09:57 +00:00
Chris Lattner
a5452c0d67
improve comment.
...
llvm-svn: 130426
2011-04-28 20:02:57 +00:00
Devang Patel
33d87d97f6
Do not lose line number info while eliminating tail call.
...
llvm-svn: 130419
2011-04-28 18:43:39 +00:00
Eli Friedman
3cf6d4032a
Actually revert r130348 correctly.
...
llvm-svn: 130418
2011-04-28 18:20:24 +00:00
Chris Lattner
1777601a74
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.
llvm-svn: 130416
2011-04-28 18:15:47 +00:00
Chris Lattner
45e393fc9c
code cleanups only.
...
llvm-svn: 130414
2011-04-28 18:08:21 +00:00
Eli Friedman
d5a80ca3c8
Revert r130348; causing buildbot issues on x86-32.
...
llvm-svn: 130412
2011-04-28 18:06:10 +00:00
Owen Anderson
715973fc6c
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>
llvm-svn: 130410
2011-04-28 17:51:45 +00:00
Devang Patel
b63596436f
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.
...
llvm-svn: 130409
2011-04-28 17:41:38 +00:00
Andrew Trick
c4456ae6ec
Reapply r130340: Fix for PR9730.
...
llvm-svn: 130408
2011-04-28 17:30:04 +00:00
Benjamin Kramer
4145c0d3b1
InstCombine: Merge "(trunc x) == C1 & (and x, CA) == C2" into a single and+icmp.
...
This happens when GVN widens loads. Part of PR6627.
llvm-svn: 130405
2011-04-28 16:58:40 +00:00
Eric Christopher
4f012fd0a1
Be more layout aware here and swap the successor and branch condition
...
if it means we get a fallthrough.
llvm-svn: 130404
2011-04-28 16:52:09 +00:00
Chris Lattner
f81f789b6c
centralize "marking for deletion" into a helper function. Pass GVN around to
...
static functions instead of passing around tons of random ivars.
llvm-svn: 130403
2011-04-28 16:36:48 +00:00
Chris Lattner
6cec6ab275
Promote toErase to be an ivar of the GVN class.
...
llvm-svn: 130401
2011-04-28 16:18:52 +00:00
Rafael Espindola
c5dac4df2e
Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
...
converting the symbol passed to .cfi_personality into bytes is the file.
llvm-svn: 130400
2011-04-28 16:09:09 +00:00
Rafael Espindola
349c3298da
Mark the EH symbol global or weak if the corresponding function is.
...
llvm-svn: 130397
2011-04-28 12:50:37 +00:00
Jay Foad
07ef11112e
Fix typos in comments.
...
llvm-svn: 130396
2011-04-28 09:12:47 +00:00
Chandler Carruth
93da3c8233
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.
llvm-svn: 130395
2011-04-28 08:37:18 +00:00
Chandler Carruth
3f7b581e2f
Revert an unintended commit. Very sorry for this one.
...
llvm-svn: 130393
2011-04-28 08:18:22 +00:00
Chandler Carruth
0c2bef1716
Fix more -Wnon-pod-memset warnings.
...
llvm-svn: 130392
2011-04-28 08:17:08 +00:00
Chandler Carruth
e63a7b21f6
nuke gold
...
llvm-svn: 130391
2011-04-28 08:17:05 +00:00
Chris Lattner
827a270a2a
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.
llvm-svn: 130390
2011-04-28 07:29:08 +00:00
Eric Christopher
a98cd22d96
Let the immediate leaf pattern take transforms and switch the signed
...
immediate patterns in arm to using the pattern.
Handles rdar://9299434
llvm-svn: 130386
2011-04-28 05:49:04 +00:00
Chris Lattner
2a75c72e1c
move PR9803 to this readme.
...
llvm-svn: 130385
2011-04-28 05:33:16 +00:00
Ted Kremenek
2901731553
Add utility method to DenseMap to return the amount of memory used for its buckets.
...
llvm-svn: 130382
2011-04-28 04:52:57 +00:00
Rafael Espindola
2eeee8cfef
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).
llvm-svn: 130379
2011-04-28 04:04:14 +00:00
Rafael Espindola
bf60fb0a37
Produce the EH_frame# symbols if needed.
...
llvm-svn: 130378
2011-04-28 03:26:11 +00:00
Rafael Espindola
96b07932a3
Forward isFunctionEHFrameSymbolPrivate. If it is false, produce the foo.eh
...
symbols.
llvm-svn: 130375
2011-04-28 02:46:42 +00:00
Devang Patel
3e021533cd
Teach dwarf writer to handle complex address expression for .debug_loc entries.
...
This fixes clang generated blocks' variables' debug info.
Radar 9279956.
llvm-svn: 130373
2011-04-28 02:22:40 +00:00
Chris Lattner
22e6c10256
silence some -Wnon-pod-memset warnings, since std::pair is not POD.
...
llvm-svn: 130364
2011-04-28 00:55:53 +00:00
Eli Friedman
33c133919a
Fix a silly mistake in r130338.
...
llvm-svn: 130360
2011-04-28 00:42:03 +00:00
Justin Holewinski
45c30df303
PTX: support for select_cc and fixes for setcc
...
- expansion of SELECT_CC into SETCC
- force SETCC result type to i1
- custom selection for handling i1 using SETCC
Patch by Dan Bailey
llvm-svn: 130358
2011-04-28 00:19:56 +00:00