Commit Graph

32887 Commits

Author SHA1 Message Date
Dan Gohman 0aa63c97ce Add a few README.txt items.
llvm-svn: 84059
2009-10-13 23:58:05 +00:00
Kevin Enderby 3a80daced0 Correct comment about ARM immediates using '#' not '$' and TODO for modifiers.
llvm-svn: 84055
2009-10-13 23:33:38 +00:00
Devang Patel d7ebfe3963 s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g

llvm-svn: 84054
2009-10-13 23:28:53 +00:00
Devang Patel a677136900 Check void type before using RAUWd.
llvm-svn: 84049
2009-10-13 22:56:32 +00:00
Bob Wilson b62d160b3c More Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
by creating TargetConstants during instruction selection instead of during
legalization.

llvm-svn: 84042
2009-10-13 22:29:24 +00:00
Kevin Enderby f50799412c More bits of the ARM target assembler for llvm-mc to parse immediates.
Also fixed a couple of coding style things that crept in.  And added more
to the temporary hacked up ARMAsmParser::MatchInstruction() method for testing.

llvm-svn: 84040
2009-10-13 22:19:02 +00:00
Evan Cheng c10e88db22 Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.
llvm-svn: 84038
2009-10-13 22:02:20 +00:00
Bob Wilson 1fdbe1152d NEON VLD/VST are now fully implemented. For operations that expand to
multiple instructions, the expansion is done during selection so there is
no need to do anything special during legalization.

llvm-svn: 84036
2009-10-13 21:55:24 +00:00
Devang Patel 115741ba79 Do not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chance to get properly updated.
llvm-svn: 84033
2009-10-13 21:41:20 +00:00
Jeffrey Yasskin d162dbac7f Keep track of stubs that are created. This fixes PR5162 and probably PR4822 and
4406. Patch by Nick Lewycky!

llvm-svn: 84032
2009-10-13 21:32:57 +00:00
Duncan Sands 18a956cb4a Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.

llvm-svn: 84027
2009-10-13 21:04:12 +00:00
Bob Wilson 3b51560ae4 Revise ARM inline assembly memory operands to require the memory address to
be in a register.  The previous use of ARM address mode 2 was completely
arbitrary and inappropriate for Thumb.  Radar 7137468.

llvm-svn: 84022
2009-10-13 20:50:28 +00:00
Dale Johannesen fd04c74bc0 Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible.  No functional change yet.

llvm-svn: 84020
2009-10-13 20:46:56 +00:00
Sandeep Patel 7460e0822f Fix method name in comment, per Bob Wilson.
llvm-svn: 84017
2009-10-13 20:25:58 +00:00
Dan Gohman 2dc6f8de03 Use the new CodeMetrics class to compute code size instead of
manually counting instructions.

llvm-svn: 84016
2009-10-13 20:12:23 +00:00
Dan Gohman abb728d3f4 Compute a full cost value even when a setjmp call is found.
llvm-svn: 84015
2009-10-13 20:10:10 +00:00
Dan Gohman 2ccea5d13f Split code not specific to Function inlining out into a separate class,
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.

llvm-svn: 84013
2009-10-13 19:58:07 +00:00
David Goodwin 4c98efb917 Add debugging output.
llvm-svn: 84011
2009-10-13 19:16:03 +00:00
Sandeep Patel 423e42b371 Add ARMv6T2 SBFX/UBFX instructions. Approved by Anton Korobeynikov.
llvm-svn: 84009
2009-10-13 18:59:48 +00:00
Ted Kremenek f34311779c Update CMake file (lexically order files).
llvm-svn: 84008
2009-10-13 18:57:27 +00:00
Devang Patel 78cb102490 Do not write empty METADATA_ATTACHMENT record.
llvm-svn: 84006
2009-10-13 18:51:28 +00:00
Devang Patel 0b26c9e0b3 Remove unnecessary assert.
llvm-svn: 84004
2009-10-13 18:51:03 +00:00
Benjamin Kramer a8d176d62f Update the other CMake file.
llvm-svn: 84003
2009-10-13 18:50:54 +00:00
Devang Patel 52b1745a96 Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.
llvm-svn: 84002
2009-10-13 18:49:55 +00:00
Ted Kremenek 113d959f1b Update CMake file.
llvm-svn: 84001
2009-10-13 18:48:07 +00:00
Evan Cheng f1f3dd3c3c Refactor some code. No functionality changes.
llvm-svn: 84000
2009-10-13 18:42:04 +00:00
Dan Gohman 54463e837a Commit the removal of this file, which is now moved to lib/Analysis.
llvm-svn: 83999
2009-10-13 18:37:20 +00:00
Dan Gohman 4552e3cd73 Move the InlineCost code from Transforms/Utils to Analysis.
llvm-svn: 83998
2009-10-13 18:30:07 +00:00
Dan Gohman 5b3e05bcaa Start refactoring the inline cost estimation code so that it can be used
for purposes other than inlining.

llvm-svn: 83997
2009-10-13 18:24:11 +00:00
Chris Lattner 19788ca686 change simplifycfg to not duplicate 'unwind' instructions. Hopefully
this will increase the likelihood of common code getting sunk towards
the unwind.

llvm-svn: 83996
2009-10-13 18:13:05 +00:00
Dan Gohman 71ca652475 Make LoopUnswitch's cost estimation count Instructions, rather than
BasicBlocks, so that it doesn't blindly procede in the presence of
large individual BasicBlocks. This addresses a class of code-size
expansion problems.

llvm-svn: 83992
2009-10-13 17:50:43 +00:00
Jeffrey Yasskin f98e981cd0 Make the ExecutionEngine automatically remove global mappings on when their
GlobalValue is destroyed.  Function destruction still leaks machine code and
can crash on leaked stubs, but this is some progress.

llvm-svn: 83987
2009-10-13 17:42:08 +00:00
Devang Patel c5cc659cfa "there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :)
llvm-svn: 83984
2009-10-13 17:35:35 +00:00
Bob Wilson 453a06e3ac Add some ARM instruction encoding bits.
Patch by Johnny Chen.

llvm-svn: 83983
2009-10-13 17:35:30 +00:00
Bob Wilson d26a26ae7e Fix regression introduced by r83894.
llvm-svn: 83982
2009-10-13 17:29:13 +00:00
Devang Patel e6f26a7415 Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
llvm-svn: 83977
2009-10-13 17:00:54 +00:00
Bob Wilson 0bc673de0d Fix a tab. Thanks to Johnny Chen for pointing it out.
llvm-svn: 83973
2009-10-13 15:27:23 +00:00
Nick Lewycky 9bc890425a Force memory use markers to have a ConstantInt for the size argument.
llvm-svn: 83960
2009-10-13 07:57:33 +00:00
Nick Lewycky e2782c7614 Teach BasicAA a little something about the atomic intrinsics: they can only
modify through the pointer they're given.

llvm-svn: 83959
2009-10-13 07:48:38 +00:00
Daniel Dunbar cdf01b5d82 Fix a -Asserts warning.
llvm-svn: 83950
2009-10-13 06:47:08 +00:00
Victor Hernandez 70e8505eb1 Memory dependence analysis was incorrectly stopping to scan for stores to a pointer at bitcast uses of a malloc call.
It should continue scanning until the malloc call, and this patch fixes that.

llvm-svn: 83931
2009-10-13 01:42:53 +00:00
Devang Patel 0f58bec599 Find enclosing subprogram info.
llvm-svn: 83922
2009-10-12 23:11:24 +00:00
Devang Patel 0af2a420cd Set default location for a function if it is not set.
llvm-svn: 83921
2009-10-12 23:10:55 +00:00
Kevin Enderby 11b32384f2 Fix two warnings about unused variables that are only used in assert() calls.
llvm-svn: 83917
2009-10-12 22:51:49 +00:00
Bob Wilson 5b07a903d4 Delete a comment that makes no sense to me. The statement that moving a CPE
before its reference is only supported on ARM has not been true for a while.
In fact, until recently, that was only supported for Thumb.  Besides that,
CPEs are always a multiple of 4 bytes in size, so inserting a CPE should have
no effect on Thumb alignment.

llvm-svn: 83916
2009-10-12 22:49:05 +00:00
Kevin Enderby 3f0b9b3db4 Fix a problem in the code where ARMAsmParser::ParseShift() second argument
should have been a pointer to a reference.

llvm-svn: 83915
2009-10-12 22:39:54 +00:00
Evan Cheng f815861591 Make licm debug message readable.
llvm-svn: 83908
2009-10-12 22:25:23 +00:00
Bob Wilson 3250e7769f Change CreateNewWater method to return NewMBB by reference.
llvm-svn: 83905
2009-10-12 21:39:43 +00:00
Bob Wilson cc121aa750 Last week, ARMConstantIslandPass was failing to converge for the
MultiSource/Benchmarks/MiBench/automotive-susan test.  The failure has
since been masked by an unrelated change (just randomly), so I don't have
a testcase for this now.  Radar 7291928.

The situation where this happened is that a constant pool entry (CPE) was
placed at a lower address than the load that referenced it.  There were in
fact 2 CPEs placed at adjacent addresses and referenced by 2 loads that were
close together in the code.  The distance from the loads to the CPEs was
right at the limit of what they could handle, so that only one of the CPEs
could be placed within range.  On every iteration, the first CPE was found
to be out of range, causing a new CPE to be inserted.  The second CPE had
been in range but the newly inserted entry pushed it too far away.  Thus the
second CPE was also replaced by a new entry, which in turn pushed the first
CPE out of range.  Etc.

Judging from some comments in the code, the initial implementation of this
pass did not support CPEs placed _before_ their references.  In the case
where the CPE is placed at a higher address, the key to making the algorithm
terminate is that new CPEs are only inserted at the end of a group of adjacent
CPEs.  This is implemented by removing a basic block from the "WaterList"
once it has been used, and then adding the newly inserted CPE block to the
list so that the next insertion will come after it.  This avoids the ping-pong
effect where CPEs are repeatedly moved to the beginning of a group of
adjacent CPEs.  This does not work when going backwards, however, because the
entries at the end of an adjacent group of CPEs are closer than the CPEs
earlier in the group.

To make this pass terminate, we need to maintain a property that changes can
only happen in some sort of monotonic fashion.  The fix used here is to require
that the CPE for a particular constant pool load can only move to lower
addresses.  This is a very simple change to the code and should not cause
any significant degradation in the results.

llvm-svn: 83902
2009-10-12 21:23:15 +00:00
Bob Wilson e4adae267e Another minor clean-up.
llvm-svn: 83897
2009-10-12 20:45:53 +00:00
Bob Wilson 196bf32ab0 Remove redundant parameter.
llvm-svn: 83894
2009-10-12 20:37:23 +00:00
Bob Wilson 3a7326e705 Use early exit to reduce indentation.
llvm-svn: 83874
2009-10-12 19:04:03 +00:00
Bob Wilson 3af34312d4 Change to return a value by reference.
llvm-svn: 83873
2009-10-12 19:01:12 +00:00
Bob Wilson c7a3cf4066 Add a typedef for an iterator.
llvm-svn: 83872
2009-10-12 18:52:13 +00:00
Dale Johannesen 06243d7bf2 Revert the kludge in 76703. I got a clean
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.

llvm-svn: 83871
2009-10-12 18:49:00 +00:00
Dale Johannesen 4c9f0e8f53 Fix warning.
llvm-svn: 83870
2009-10-12 18:45:32 +00:00
Jeffrey Yasskin 406ac811ab Fix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on the
same Value without breaking things.

llvm-svn: 83861
2009-10-12 17:43:32 +00:00
Dan Gohman 32eed95a78 Remove a redundant member variable.
llvm-svn: 83857
2009-10-12 16:44:10 +00:00
Dan Gohman a698d7ac3c Don't forget to mark RAX as live-out of the function when arranging for
it to hold the address of an sret return value, for x86-64 ABI purposes.

Also, fix the test that was originally intended to test this to actually
test it, using FileCheck.

llvm-svn: 83853
2009-10-12 16:36:12 +00:00
Nate Begeman a3ed9edd40 More heuristics for Combiner-AA. Still catches all important cases, but
compile time penalty on gnugo, the worst case in MultiSource, is down to
about 2.5% from 30%

llvm-svn: 83824
2009-10-12 05:53:58 +00:00
Edward O'Callaghan 8227b0512f Haiku porting patches, Credit to Paul Davey.
llvm-svn: 83823
2009-10-12 04:57:20 +00:00
Chris Lattner 0840c823e4 Fix PR5087, patch by Jakub Staszak!
llvm-svn: 83822
2009-10-12 04:22:44 +00:00
Chris Lattner 40cf28d6eb add some more hooks to the C bindings, patch by Kenneth Uildriks!
llvm-svn: 83821
2009-10-12 04:01:02 +00:00
Chris Lattner 8abd572dae populate instcombine's initial worklist more carefully, causing
it to visit instructions from the start of the function to the
end of the function in the first path.  This greatly speeds up
some pathological cases (e.g. PR5150).

Try #3, this time with some unneeded debug info stuff removed
which was causing dead pointers to be added to the worklist.

llvm-svn: 83818
2009-10-12 03:58:40 +00:00
Chris Lattner 8ce6b36c86 revert r83814 for now, it is making the llvm-gcc bootstrap unhappy.
llvm-svn: 83817
2009-10-11 23:56:08 +00:00
Chris Lattner 78d6310429 populate instcombine's initial worklist more carefully, causing
it to visit instructions from the start of the function to the
end of the function in the first path.  This greatly speeds up
some pathological cases (e.g. PR5150). 

llvm-svn: 83814
2009-10-11 23:17:43 +00:00
Anton Korobeynikov 4b38ce9f25 Add missed mem-mem move patterns
llvm-svn: 83812
2009-10-11 23:03:53 +00:00
Anton Korobeynikov 415c3dc501 Add MSP430 mem-mem insts support. Patch by Brian Lucas with some my refinements
llvm-svn: 83811
2009-10-11 23:03:28 +00:00
Chris Lattner 2c2deae5ac remove some harmful code that would turn an insertelement on an undef
into a shuffle even if it was used by another insertelement.  If the
visitation order of instcombine was wrong, this would turn a chain of
insertelements into a chain of shufflevectors, which was quite painful.

Since CollectShuffleElements handles these cases, the code can just
be nuked.

llvm-svn: 83810
2009-10-11 23:02:46 +00:00
Chris Lattner c6cdbfbfdd teach instcombine to simplify xor's harder, catching the
new testcase.

llvm-svn: 83799
2009-10-11 22:22:13 +00:00
Chris Lattner 6e6ac47125 cleanups
llvm-svn: 83797
2009-10-11 22:00:32 +00:00
Chris Lattner 1639234775 cleanup, no functionality change.
llvm-svn: 83795
2009-10-11 21:36:10 +00:00
Chris Lattner fd27f8a5b3 generalize a transformation even more: we don't care whether the
input the the mul is a zext from bool, just that it is all zeros
other than the low bit.  This fixes some phase ordering issues
that would cause us to miss some xforms in mul.ll when the worklist
is visited differently.

llvm-svn: 83794
2009-10-11 21:29:45 +00:00
Chris Lattner 406cb75c6b simplify a transformation by making it more general.
llvm-svn: 83792
2009-10-11 21:22:21 +00:00
Chris Lattner f39f4f928a temporarily revert previous patch
llvm-svn: 83791
2009-10-11 21:05:34 +00:00
Chris Lattner bb058d3a23 populate instcombine's initial worklist more carefully, causing
it to visit instructions from the start of the function to the
end of the function in the first path.  This greatly speeds up
some pathological cases (e.g. PR5150). 

llvm-svn: 83790
2009-10-11 21:04:37 +00:00
Torok Edwin 8b3081350e Remove CleanupDbgInfo, instcombine does this and its not worth duplicating it
here.

llvm-svn: 83789
2009-10-11 19:58:35 +00:00
Torok Edwin 907ec36943 LICM shouldn't sink/delete debug information. Fix this and add a testcase.
For now the metadata of sinked/hoisted instructions is still wrong, but that'll
be fixed when instructions will have debug metadata directly attached.

llvm-svn: 83786
2009-10-11 19:15:54 +00:00
Anton Korobeynikov 6bce6bbf40 Implement 'm' memory operand properly
llvm-svn: 83785
2009-10-11 19:14:21 +00:00
Anton Korobeynikov a58a3f930a Implement proper asmprinting for the globals. This eliminates bogus "call" modifier and also adds support for offsets wrt globals.
llvm-svn: 83784
2009-10-11 19:14:02 +00:00
Anton Korobeynikov 3525a4a268 Implement asm printing for inline asm memory operands
llvm-svn: 83783
2009-10-11 19:13:34 +00:00
Chris Lattner 85c85c5e04 when folding duplicate conditions, delete the
now-probably-dead instruction tree feeding it.

llvm-svn: 83778
2009-10-11 18:39:58 +00:00
Chris Lattner e374382b8f implement rdar://7293527, a trivial instcombine that llvm-gcc
gets but clang doesn't, because it is implemented in GCC's
fold routine.

llvm-svn: 83761
2009-10-11 07:53:15 +00:00
Chris Lattner 97b1405207 implement a transformation in jump threading that is currently
done by condprop, but do it in a much more general form.  The
basic idea is that we can do a limited form of tail duplication
in the case when we have a branch on a phi.  Moving the branch
up in to the predecessor block makes instruction selection
much easier and encourages chained jump threadings.

llvm-svn: 83759
2009-10-11 07:24:57 +00:00
Chris Lattner 6ce85e85f5 restructure some code, no functionality change.
llvm-svn: 83756
2009-10-11 04:40:21 +00:00
Chris Lattner f466bc84c9 factor some code better and move a function, no functionality change.
llvm-svn: 83755
2009-10-11 04:33:43 +00:00
Chris Lattner f99a74e24b make jump threading on a phi with undef inputs happen.
llvm-svn: 83754
2009-10-11 04:18:15 +00:00
Chris Lattner 71d353dd48 rewrite LCSSA to use SSAUpdate, to only return true if it modifies
the IR, and to implement the FIXME'd optimization.

llvm-svn: 83748
2009-10-11 02:53:37 +00:00
Chris Lattner 101dde30ed clean up and simplify some code. Don't use setvector when things will be
inserted only once, just use vector.  Don't compute ExitBlocks unless we
need it, change std::sort to array_pod_sort.

llvm-svn: 83747
2009-10-11 01:07:15 +00:00
Chris Lattner b6c65faa64 switch GVN to use SSAUpdater. Besides removing a lot of complexity
from GVN, this also speeds it up, inserts fewer PHI nodes (see the
testcase) and allows it to remove more loads (due to fewer PHI nodes
standing in the way).

llvm-svn: 83746
2009-10-10 23:50:30 +00:00
Chris Lattner 9c382cebc5 add a simple helper method.
llvm-svn: 83745
2009-10-10 23:41:48 +00:00
Chris Lattner 249265de06 add ability for clients of SSAUpdater to find out about the
PHI nodes inserted.

llvm-svn: 83744
2009-10-10 23:15:24 +00:00
Chris Lattner 89d2a5c4f3 remove dead code
llvm-svn: 83742
2009-10-10 23:04:12 +00:00
Chris Lattner 67cdd8b567 add the ability to get a rewritten value from the middle of a block,
not just at the end.  Add a big comment explaining when this could
be useful (which never happens for jump threading).

llvm-svn: 83741
2009-10-10 23:00:11 +00:00
Chris Lattner e474a8d3a7 rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
what it does.

llvm-svn: 83740
2009-10-10 22:41:58 +00:00
Anton Korobeynikov 5b8826b4da It seems that OR operation does not affect status reg at all.
Remove impdef of SRW. This fixes PR4779

llvm-svn: 83739
2009-10-10 22:17:47 +00:00
Chris Lattner 65e69a77e1 use a typedef instead of spelling out an insane type. Yay for auto someday.
llvm-svn: 83707
2009-10-10 09:09:20 +00:00
Chris Lattner 84095071ea Change jump threading to use the new SSAUpdater class instead of
DemoteRegToStack.  This makes it more efficient (because it isn't
creating a ton of load/stores that are eventually removed by a later
mem2reg), and more slightly more effective (because those load/stores
don't get in the way of threading).

llvm-svn: 83706
2009-10-10 09:05:58 +00:00
Chris Lattner 60d4e69c81 Implement an efficient and fully general SSA update mechanism that
works on unstructured CFGs.  This implements PR217, our oldest open PR.

llvm-svn: 83705
2009-10-10 09:04:27 +00:00
Chris Lattner f30a2b0c86 random tidying
llvm-svn: 83701
2009-10-10 06:22:45 +00:00
Dan Gohman b8120770b4 Create a new InstrEmitter class for translating SelectionDAG nodes
into MachineInstrs. This is mostly just moving the code from
ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr
emitting from scheduling.

llvm-svn: 83699
2009-10-10 01:32:21 +00:00
Dan Gohman a22f2d8614 Make getMachineNode return a MachineSDNode* instead of a generic SDNode*
since it won't do any folding. This will help avoid some inconvenient
casting.

llvm-svn: 83698
2009-10-10 01:29:16 +00:00
Dan Gohman 1faa11521e Remove a no-longer-necessary #include.
llvm-svn: 83697
2009-10-10 00:36:09 +00:00
Dan Gohman e919de5acf Replace X86's CanRematLoadWithDispOperand by calling the target-independent
MachineInstr::isInvariantLoad instead, which has the benefit of being
more complete.

llvm-svn: 83696
2009-10-10 00:34:18 +00:00
Dan Gohman 26e9b89b7c Fix a missing initialization of PostRAScheduler's AA member.
llvm-svn: 83695
2009-10-10 00:15:38 +00:00
Dan Gohman 918ec53c64 The ScheduleDAG framework now requires an AliasAnalysis argument, though
it isn't needed in the ScheduleDAGSDNodes schedulers.

llvm-svn: 83691
2009-10-09 23:33:48 +00:00
Dan Gohman 4a72f7ab53 Mark the LDR instruction with isReMaterializable, as it is rematerializable
when loading from an invariant memory location.

llvm-svn: 83688
2009-10-09 23:28:27 +00:00
Dan Gohman 87b02d5bbc Factor out LiveIntervalAnalysis' code to determine whether an instruction
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.

This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.

llvm-svn: 83687
2009-10-09 23:27:56 +00:00
Devang Patel df45c7f642 Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.

llvm-svn: 83684
2009-10-09 22:42:28 +00:00
Jeffrey Yasskin 307c053f2e ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverse
mappings, which could cause errors and assert-failures.  This patch fixes that,
adds a test, and refactors the global-mapping-removal code into a single place.

llvm-svn: 83678
2009-10-09 22:10:27 +00:00
Dan Gohman f4eb6777e5 Add a const qualifier.
llvm-svn: 83677
2009-10-09 22:09:05 +00:00
Dale Johannesen 96a5b87ae2 Use names instead of numbers for some of the magic
constants used in inlining heuristics (especially
those used in more than one file).  No functional change.

llvm-svn: 83675
2009-10-09 21:42:02 +00:00
Kevin Enderby a2b99107c4 Added another bit of the ARM target assembler to llvm-mc to parse register
lists.  Changed ARMAsmParser::MatchRegisterName to return -1 instead of 0 on
errors so 0-15 values could be returned as register numbers.  Also added the
rest of the arm register names to the currently hacked up version to allow more
testing.  Some changes to ARMAsmParser::ParseOperand to give different errors
for things not yet supported and some additions to the hacked
ARMAsmParser::MatchInstruction to allow more testing for now.

llvm-svn: 83673
2009-10-09 21:12:28 +00:00
Dan Gohman e19c1810d7 isTriviallyReMaterializable checks the
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do
this check in its callers.

llvm-svn: 83671
2009-10-09 21:02:10 +00:00
Dan Gohman 7d9dffb413 Fix the x86 test-shrink optimization so that it doesn't shrink comparisons
when one of the bits being tested would end up being the sign bit in the
narrower type, and a signed comparison is being performed, since this would
change the result of the signed comparison. This fixes PR5132.

llvm-svn: 83670
2009-10-09 20:35:19 +00:00
Dan Gohman dd76bb23d1 Add basic infrastructure and x86 support for preserving MachineMemOperand
information when unfolding memory references.

llvm-svn: 83656
2009-10-09 18:10:05 +00:00
Devang Patel fafa1fe2ad Check invalid debug info for enums. This may happen when underlyng enum is optimized away. Eventually DwarfChecker will clean this up during llvm verification stage.
llvm-svn: 83655
2009-10-09 17:51:49 +00:00
Jim Grosbach 26070c5cff when previous scratch register is killed, flag the value as no longer tracking
llvm-svn: 83653
2009-10-09 17:33:33 +00:00
Dan Gohman dc4893abfe Revert r83606 and add comments explaining why it isn't safe.
llvm-svn: 83649
2009-10-09 16:35:06 +00:00
Evan Cheng 7ddb844a2d Give Dan and my recent changes, machine LICM is now code size neutral.
llvm-svn: 83624
2009-10-09 06:31:25 +00:00
Evan Cheng ccd4545ecb Fix a logic error that caused non-rematable loop invariants loads to be licm'ed out of loop.
llvm-svn: 83622
2009-10-09 06:21:52 +00:00
Evan Cheng be27d61cbc Reset kill markers after live interval is reconstructed.
llvm-svn: 83608
2009-10-09 01:17:11 +00:00
Dan Gohman d65387a49f Preserve HasNSW and HasNUW when constructing SCEVs for Add and Mul
instructions.

llvm-svn: 83606
2009-10-09 00:41:22 +00:00
Dale Johannesen 3059924bdd When considering whether to inline Callee into Caller,
and that will make Caller too big to inline, see if it
might be better to inline Caller into its callers instead.
This situation is described in PR 2973, although I haven't
tried the specific case in SPASS.

llvm-svn: 83602
2009-10-09 00:11:32 +00:00
Dan Gohman 816fe0a4aa Add the ability to track HasNSW and HasNUW on more kinds of SCEV expressions.
llvm-svn: 83601
2009-10-09 00:10:36 +00:00
Bob Wilson 84e7967fae Add codegen support for NEON vst4lane intrinsics with 128-bit vectors.
llvm-svn: 83600
2009-10-09 00:01:36 +00:00
Bob Wilson c409030838 Add codegen support for NEON vst3lane intrinsics with 128-bit vectors.
llvm-svn: 83598
2009-10-08 23:51:31 +00:00
Bob Wilson b851eb356a Add codegen support for NEON vst2lane intrinsics with 128-bit vectors.
llvm-svn: 83596
2009-10-08 23:38:24 +00:00
Bob Wilson 38ba47225a Add codegen support for NEON vld4lane intrinsics with 128-bit vectors.
Also fix some copy-and-paste errors in previous changes.

llvm-svn: 83590
2009-10-08 22:53:57 +00:00
Evan Cheng e23984fbbe Remove code that makes no sense.
llvm-svn: 83589
2009-10-08 22:42:35 +00:00
Bob Wilson cf54e934f8 Add codegen support for NEON vld3lane intrinsics with 128-bit vectors.
llvm-svn: 83585
2009-10-08 22:27:33 +00:00
Douglas Gregor da3c79698c Update CMake build yet again after a source file was removed
llvm-svn: 83575
2009-10-08 21:24:34 +00:00
Bill Wendling 3dc625cdce It's possible for a global variable to be optimized out of a metadata object. So
we should allow a "null" with this dyn_cast.

llvm-svn: 83573
2009-10-08 20:52:51 +00:00
Anton Korobeynikov 222b86cd54 Use lower16 / upper16 imm modifiers to asmprint 32-bit imms splitted via movt/movw pair.
llvm-svn: 83572
2009-10-08 20:43:22 +00:00
Devang Patel e1969dcd11 Clear variable debug info map at the end of the function.
llvm-svn: 83571
2009-10-08 20:41:17 +00:00
Bob Wilson c2728f44a9 Add codegen support for NEON vld2lane intrinsics with 128-bit vectors.
llvm-svn: 83568
2009-10-08 18:56:10 +00:00
Bob Wilson fac9476589 Clean up some unnecessary initializations.
llvm-svn: 83566
2009-10-08 18:52:56 +00:00
Bob Wilson 4facd965bd Clean up a comment (indentation was wrong).
llvm-svn: 83565
2009-10-08 18:51:31 +00:00
Bob Wilson 2a45a65511 Add a SelectionDAG getTargetInsertSubreg convenience function,
similar to getTargetExtractSubreg.

llvm-svn: 83564
2009-10-08 18:49:46 +00:00
Devang Patel 20b2a77765 Do not record line number to implicitly mark start of function if function has arguments. Extra line number entries trip gdb in some cases.
llvm-svn: 83563
2009-10-08 18:48:03 +00:00
Richard Osborne 02fda54e8f Add missing names for the XCore specific LADD and LSUB nodes.
llvm-svn: 83556
2009-10-08 17:14:57 +00:00
Dan Gohman 09984279fd Add a form of addPreserved which takes a string argument, to allow passes
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.

llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Richard Osborne 4e13316bf9 Add some peepholes for signed comparisons using ashr X, X, 32.
llvm-svn: 83549
2009-10-08 15:38:17 +00:00
Chris Lattner 78765deded remove LoopVR pass. According to Nick:
"LoopVR's logic was copied into ScalarEvolution::getUnsignedRange and 
::getSignedRange. Please delete LoopVR."

llvm-svn: 83531
2009-10-08 06:42:44 +00:00
Bob Wilson b6b0ab6117 Add codegen support for NEON vst4 intrinsics with <1 x i64> vectors.
llvm-svn: 83526
2009-10-08 05:18:18 +00:00
Jim Grosbach 534ea5ae32 Cleanup up unused R3LiveIn tracking.
llvm-svn: 83522
2009-10-08 01:50:26 +00:00
Jim Grosbach c0615aa17f Re-enable register scavenging in Thumb1 by default.
llvm-svn: 83521
2009-10-08 01:46:59 +00:00
Jim Grosbach 48a805bc6c bugfix. The target may use virtual registers that aren't tracked for re-use but are allocated by the scavenger. The re-use algorithm needs to watch for that.
llvm-svn: 83519
2009-10-08 01:09:45 +00:00
Bob Wilson 71387b4b2f Add codegen support for NEON vst3 intrinsics with <1 x i64> vectors.
llvm-svn: 83518
2009-10-08 00:28:28 +00:00
Bob Wilson d4f5670096 Add codegen support for NEON vst2 intrinsics with <1 x i64> vectors.
llvm-svn: 83513
2009-10-08 00:21:01 +00:00