Anton Korobeynikov [Wed, 7 Apr 2010 18:20:58 +0000 (18:20 +0000)]
Add MAC stuff for A9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100660
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:53 +0000 (18:20 +0000)]
Fix invalid NEON MAC itins on A8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100659
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:47 +0000 (18:20 +0000)]
Fix itins for VPAL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100658
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:42 +0000 (18:20 +0000)]
Fix itins for VABA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100657
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:36 +0000 (18:20 +0000)]
Correct VMVN itinerary: operand is read in the second cycle, not in the first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100656
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:29 +0000 (18:20 +0000)]
More A9 itineraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100655
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:24 +0000 (18:20 +0000)]
Correct itinerary class for VPADD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100654
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:18 +0000 (18:20 +0000)]
VP{MAX, MIN} are of IIC_VSUBi4D itin class as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100653
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:13 +0000 (18:20 +0000)]
VHADD differs from VHSUB at least on A9 - the former reads both operands in the second cycle, while the latter reads second operand in first cycle. Introduce new itin classes to catch this behavior. Whether this is true for A8 as well is WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100652
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:07 +0000 (18:20 +0000)]
Some easy NEON scheduling goodness for A9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100651
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:20:02 +0000 (18:20 +0000)]
Define new itin classes for ARM <-> VFP reg moves to distinguish from NEON ops. Define proper scheduling itinerary for them on A9. A8 TRM does not specify latency for them at all :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100650
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:56 +0000 (18:19 +0000)]
FCONST{S,D} behaves the same way as FP unary instructions. This is true for both A8 and A9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100649
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:51 +0000 (18:19 +0000)]
Proper cycle times for locks, since wbck latency can be larger than fwd latency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100648
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:46 +0000 (18:19 +0000)]
Add new itin classes for FP16 <-> FP32 conversions and make uise of them for A9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100647
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:40 +0000 (18:19 +0000)]
Make use of new reserved/required scheduling stuff: introduce VFP and NEON locks to model domain cross stalls precisly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100646
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:32 +0000 (18:19 +0000)]
Initial support for different kinds of FU reservation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100645
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:24 +0000 (18:19 +0000)]
Factor out scoreboard into separate class. This way we might have several different score boards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100644
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:18 +0000 (18:19 +0000)]
Some bits of A9 scheduling: VFP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100643
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:13 +0000 (18:19 +0000)]
Separate const from non-const stuff during mergeing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100642
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:19:07 +0000 (18:19 +0000)]
Some initial version of global merger
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100641
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 7 Apr 2010 18:18:42 +0000 (18:18 +0000)]
Add hook to insert late LLVM=>LLVM passes just before isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 18:13:33 +0000 (18:13 +0000)]
fix 80 col violation, patch by Alastair Lynn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 18:10:38 +0000 (18:10 +0000)]
add a comment line that got dropped
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100638
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 18:04:56 +0000 (18:04 +0000)]
this has a pr!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100637
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 18:03:19 +0000 (18:03 +0000)]
fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100636
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 7 Apr 2010 11:23:46 +0000 (11:23 +0000)]
Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100620
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Wed, 7 Apr 2010 10:44:46 +0000 (10:44 +0000)]
Workaround the breakage in r100616 by guarding all timers with
TimePassesIsEnabled. This should allow make check to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100618
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 7 Apr 2010 09:28:04 +0000 (09:28 +0000)]
Use the "NamedGroupTimer" class to categorize DWARF emission better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100616
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 7 Apr 2010 09:26:51 +0000 (09:26 +0000)]
Use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100615
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 7 Apr 2010 07:06:48 +0000 (07:06 +0000)]
Remove XFAIL for vg_leak as the leaks are fixed by 100601.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100612
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 7 Apr 2010 06:35:53 +0000 (06:35 +0000)]
Update langref for memcpy, memmove, and memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100611
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 7 Apr 2010 06:00:33 +0000 (06:00 +0000)]
Add comments for missed opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100610
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 7 Apr 2010 05:59:12 +0000 (05:59 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100609
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 05:38:05 +0000 (05:38 +0000)]
Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present. Document this nonsense in langref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 05:27:36 +0000 (05:27 +0000)]
remove another magic number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100606
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 05:20:54 +0000 (05:20 +0000)]
Three changes:
1. Introduce some enums and accessors in the InlineAsm class
that eliminate a ton of magic numbers when handling inline
asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
metadata, propagating it to the instruction emitter, which
drops it.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100605
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Apr 2010 04:08:57 +0000 (04:08 +0000)]
fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXX
We would return the error without inserting the new instruction
into the program, so it wouldn't get deallocated, and an abort
would trigger when the module was deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100602
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 7 Apr 2010 03:36:01 +0000 (03:36 +0000)]
Fix memory leaks for external symbol name strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100601
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 7 Apr 2010 01:49:15 +0000 (01:49 +0000)]
Clean up some signedness oddities in this code noticed by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100599
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 7 Apr 2010 01:15:14 +0000 (01:15 +0000)]
Move printing of target-indepedent DEBUG_VALUE comments
into AsmPrinter. Target-dependent form is still generated
by FastISel and still handled in X86 code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 7 Apr 2010 00:41:17 +0000 (00:41 +0000)]
Post regalloc LICM. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100592
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 6 Apr 2010 23:53:48 +0000 (23:53 +0000)]
Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar
7833483.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100586
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 6 Apr 2010 23:44:44 +0000 (23:44 +0000)]
Let that which does not matter truly slide.
This test only cares about alignment, so don't test for other cruft.
An upcoming llvm-gcc patch needs this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100584
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 6 Apr 2010 23:35:53 +0000 (23:35 +0000)]
Fix a number of clang -Wsign-compare warnings that didn't have an obvious
solution. The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100581
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 6 Apr 2010 22:45:26 +0000 (22:45 +0000)]
Revert 100573, it's causing some testsuite problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100578
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 6 Apr 2010 22:21:07 +0000 (22:21 +0000)]
Move printing of DEBUG_VALUE comments to target-independent place.
There is probably a more elegant way to do this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100573
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 6 Apr 2010 22:02:24 +0000 (22:02 +0000)]
Expand SELECT and SELECT_CC for NEON vector types.
Radar
7770501.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100568
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 6 Apr 2010 21:59:56 +0000 (21:59 +0000)]
Allow for the possibility that a debug-value points
to a SDNode that didn't have code generated for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100566
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 6 Apr 2010 21:38:29 +0000 (21:38 +0000)]
Reverting 100530 & 100531 due to regressions in the GDB test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100563
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 6 Apr 2010 20:26:37 +0000 (20:26 +0000)]
Fix PR6696 and PR6663
When a frame pointer is not otherwise required, and dynamic stack alignment
is necessary solely due to the spilling of a register with larger alignment
requirements than the default stack alignment, the frame pointer can be both
used as a general purpose register and a frame pointer. That goes poorly, for
obvious reasons. This patch brings back a bit of old logic for identifying
the use of such registers and conservatively reserves the frame pointer
during register allocation in such cases.
For now, implement for X86 only since it's 32-bit linux which is hitting this,
and we want a targeted fix for 2.7. As a follow-on, this will be expanded
to handle other targets, as theoretically the problem could arise elsewhere
as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100559
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Apr 2010 20:07:21 +0000 (20:07 +0000)]
Make this hack more specific to the Apple gcc 4.2 non-LLVM compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100556
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 6 Apr 2010 19:48:56 +0000 (19:48 +0000)]
Don't try to collapse DomainValues onto an incompatible SSE domain.
This fixes the Bullet regression on i386/nocona.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100553
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 6 Apr 2010 19:32:30 +0000 (19:32 +0000)]
performance: get rid of repeated dereferencing of use_iterator by caching its result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100550
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 6 Apr 2010 19:24:18 +0000 (19:24 +0000)]
make more two predicates constant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100549
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 6 Apr 2010 19:14:05 +0000 (19:14 +0000)]
performance: get rid of repeated dereferencing of use_iterator by caching its result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100547
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 6 Apr 2010 18:58:22 +0000 (18:58 +0000)]
const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100546
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 6 Apr 2010 18:45:08 +0000 (18:45 +0000)]
use CallSite to access calls vs. invokes uniformly
and remove assumptions about operand order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100544
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 18:37:22 +0000 (18:37 +0000)]
this accessor doesn't need to copy the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 18:06:18 +0000 (18:06 +0000)]
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Add a simplified constructor for clients that don't have locations
like "file not found" errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100538
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 6 Apr 2010 17:19:55 +0000 (17:19 +0000)]
Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100532
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 6 Apr 2010 17:19:32 +0000 (17:19 +0000)]
Revise debug info machinery to digest nested functions and classes.
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function. GCC presents the innermost
function to llvm-convert first. Heretofore, the debug info mistakenly
placed the inner function at module scope. This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested. Radar
7426545.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100530
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 6 Apr 2010 14:52:14 +0000 (14:52 +0000)]
Adding SAFECode to the list of projects that work with LLVM 2.7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100525
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Tue, 6 Apr 2010 08:27:51 +0000 (08:27 +0000)]
Remove assert to treat memmove and memset like memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100521
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 6 Apr 2010 04:20:48 +0000 (04:20 +0000)]
Use a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks the
use case where someone wants to resurrect LLVM after calling llvm_shutdown,
but I'm not aware of any clients that are affected by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100519
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 6 Apr 2010 03:12:43 +0000 (03:12 +0000)]
Avoid overflowing a signed integer which triggers undefined behaviour.
Overflowing an unsigned integer is fine and behaves as you would expect.
Also fix a pasto, allowing SignExtend64 to take a 64-bit argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100517
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 6 Apr 2010 01:31:12 +0000 (01:31 +0000)]
Add a const qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:58:50 +0000 (00:58 +0000)]
propagate cookie management out one layer of function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:55:39 +0000 (00:55 +0000)]
report errors through LLVMContext's inline asm handler if available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100509
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:51:52 +0000 (00:51 +0000)]
Give MachineModuleInfo an actual Module*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100508
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:44:45 +0000 (00:44 +0000)]
give LLVMContext an inline asm diagnostic hook member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100506
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 6 Apr 2010 00:38:32 +0000 (00:38 +0000)]
Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100505
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:33:43 +0000 (00:33 +0000)]
give the SourceMgr object a cookie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100504
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Apr 2010 00:26:48 +0000 (00:26 +0000)]
Give llvm::SourceMgr the ability to have a client-specified
diagnostic handler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100503
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Apr 2010 23:53:46 +0000 (23:53 +0000)]
Remove MaybeOwningPtr. We're going to use reference-counting instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100499
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 5 Apr 2010 23:48:02 +0000 (23:48 +0000)]
Properly enable load clustering.
Operand 2 on a load instruction does not have to be a RegisterSDNode for this to
work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100497
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Apr 2010 23:33:29 +0000 (23:33 +0000)]
Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 23:15:42 +0000 (23:15 +0000)]
Give AsmParser an option to control whether it finalizes
the stream. New demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 23:11:24 +0000 (23:11 +0000)]
add .o file writing for inline asm in llc. Here's a silly
demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm
Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:
$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$
don't stop at inc!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 23:07:42 +0000 (23:07 +0000)]
add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100490
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 23:07:18 +0000 (23:07 +0000)]
tidy #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100489
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 5 Apr 2010 22:59:21 +0000 (22:59 +0000)]
Output floating point representations in DWARF format. This is done by outputing
the FP encoding directly as a hex representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 22:49:48 +0000 (22:49 +0000)]
update unit test for api change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100486
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 22:42:30 +0000 (22:42 +0000)]
stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Apr 2010 22:30:05 +0000 (22:30 +0000)]
Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100482
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Apr 2010 22:21:09 +0000 (22:21 +0000)]
Fix ADD32rr_alt instruction encoding bug. Patch by Marius Wachtler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 22:14:48 +0000 (22:14 +0000)]
fix a really nasty bug that Evan was tracking in SCCP. When resolving
undefs in branches/switches, we have two cases: a branch on a literal
undef or a branch on a symbolic value which is undef. If we have a
literal undef, the code was correct: forcing it to a constant is the
right thing to do.
If we have a branch on a symbolic value that is undef, we should force
the symbolic value to a constant, which then makes the successor block
live. Forcing the condition of the branch to being a constant isn't
safe if later paths become live and the value becomes overdefined. This
is the case that 'forcedconstant' is designed to handle, so just use it.
This fixes rdar://
7765019 but there is no good testcase for this, the
one I have is too insane to be useful in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100478
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 21:18:32 +0000 (21:18 +0000)]
some code cleanups, use SwitchInst::findCaseValue, reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100468
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Apr 2010 21:16:25 +0000 (21:16 +0000)]
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100467
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Apr 2010 21:14:32 +0000 (21:14 +0000)]
Remove FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100466
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Apr 2010 21:09:22 +0000 (21:09 +0000)]
Introduce MaybeOwningPtr, a smart pointer that may (or may not) have
ownership over the pointer it contains. Useful when we want to
communicate ownership while still having several clients holding on to
the same pointer *without* introducing reference counting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100463
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Mon, 5 Apr 2010 21:09:12 +0000 (21:09 +0000)]
Fix OProfileJITEventListener build for new DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100461
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 5 Apr 2010 20:24:08 +0000 (20:24 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100459
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 20:11:45 +0000 (20:11 +0000)]
lowering a volatile llvm.memcpy to a libc memcpy is ok.
PR6779
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 5 Apr 2010 19:17:22 +0000 (19:17 +0000)]
Don't do code sinking on unreachable blocks. It's unprofitable and hazardous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100455
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 5 Apr 2010 19:16:38 +0000 (19:16 +0000)]
Add an isReachableFromEntry to MachineDominators, following the one
in Dominators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100454
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 5 Apr 2010 18:35:37 +0000 (18:35 +0000)]
Update to note that clang has a baseline now. Dropping x86-32 for MacOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 17:52:31 +0000 (17:52 +0000)]
don't use emitlabel in the arm asm printer yet, the order
isn't well specified. ARM really needs to have its instprinter
finished at some point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100439
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 5 Apr 2010 17:50:20 +0000 (17:50 +0000)]
Push const through the regex engine. Fixes some of the warnings in PR6616.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Apr 2010 16:32:14 +0000 (16:32 +0000)]
fix a couple problems I introduced handling symbols
with spaces in them. Sym->getName() != OS << *Sym
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100434
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 5 Apr 2010 10:17:15 +0000 (10:17 +0000)]
Disambiguate else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100423
91177308-0d34-0410-b5e6-
96231b3b80d8