Daniel Dunbar
d4764717de
Remove duplicate implementation of excludes functionality, and support excluding
...
dirnames.
Also, add support for the 'unsupported' config property.
llvm-svn: 88838
2009-11-15 07:22:58 +00:00
Nick Lewycky
6a6ac7e105
Correct typo.
...
llvm-svn: 88831
2009-11-15 06:16:57 +00:00
Nick Lewycky
e29fa4c7a1
Teach instcombine to look for booleans in wider integers when it encounters a
...
zext(icmp). It may be able to optimize that away. This fixes one of the cases
in PR5438.
llvm-svn: 88830
2009-11-15 05:55:17 +00:00
Lang Hames
6da915ac86
Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.
...
llvm-svn: 88829
2009-11-15 04:39:51 +00:00
Daniel Dunbar
ad6c15465c
lit: Add --repeat=N option, for running each test N times.
...
- Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.
llvm-svn: 88827
2009-11-15 01:02:09 +00:00
Daniel Dunbar
18f845fccd
Remove bogus corei7 and atom entries, the family was incorrect.
...
llvm-svn: 88818
2009-11-14 22:04:42 +00:00
Jim Grosbach
f16a3b7a9f
remove xfail
...
llvm-svn: 88817
2009-11-14 21:57:35 +00:00
Daniel Dunbar
397235f11c
Fill out X86 table, although we are missing lots of names for things. We now
...
properly detect my Xeon box though.
llvm-svn: 88814
2009-11-14 21:36:19 +00:00
Daniel Dunbar
d90a9a04f3
Report the detected host CPU in --version.
...
llvm-svn: 88813
2009-11-14 21:36:07 +00:00
Jim Grosbach
e07594df45
cleanup.
...
llvm-svn: 88812
2009-11-14 21:33:37 +00:00
Jim Grosbach
ae84426ed8
Do not merge jump tables this early. Branch folding will do any necessary
...
merges, and until then, it's useful to keep the tables separate for ease
of manipulation.
llvm-svn: 88806
2009-11-14 20:15:03 +00:00
Jim Grosbach
43d2108546
Cleanup flow, and only update the jump table we're analyzing when replacing a destination MBB.
...
llvm-svn: 88805
2009-11-14 20:10:18 +00:00
Jim Grosbach
9c8609ea1c
Add function to replace a destination MBB in a single jump table
...
llvm-svn: 88804
2009-11-14 20:09:13 +00:00
Benjamin Kramer
69865cc1db
Remove dead variable found by clang++.
...
llvm-svn: 88803
2009-11-14 19:51:20 +00:00
Richard Osborne
d5f2745965
Add XCore support for arbitrary-sized aggregate returns.
...
llvm-svn: 88802
2009-11-14 19:33:35 +00:00
Anton Korobeynikov
fd0c7bae2a
Temporary disable the error - it seems to be too conservative.
...
llvm-svn: 88800
2009-11-14 18:01:41 +00:00
Benjamin Kramer
8c19a8f17b
Implement DISABLE_INLINE for MSVC. This required changing the position in all
...
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!
llvm-svn: 88798
2009-11-14 16:37:18 +00:00
Benjamin Kramer
4197054ece
This test doesn't work on arm either.
...
llvm-svn: 88794
2009-11-14 15:15:39 +00:00
Benjamin Kramer
56ffa48473
Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
...
decl so move it there. GCC accepts it both in front and after decls.
llvm-svn: 88791
2009-11-14 14:14:58 +00:00
Daniel Dunbar
241d01b590
Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
...
- This is an initial step towards -march=native support in Clang, and towards
eliminating host dependencies in the targets. See PR5389.
- Patch by Roman Divacky!
llvm-svn: 88768
2009-11-14 10:09:12 +00:00
Nick Lewycky
7935bcb0fe
Remove LLVMContext from reassociate. It was threaded through every function but
...
ultimately never used.
llvm-svn: 88763
2009-11-14 07:25:54 +00:00
Sanjiv Gupta
d03742a122
revert 88761 as it fails builds.
...
llvm-svn: 88762
2009-11-14 07:22:25 +00:00
Sanjiv Gupta
8f9c22646b
Fix debug info crashes for PIC16.
...
llvm-svn: 88761
2009-11-14 06:19:49 +00:00
Nick Lewycky
c53e2ecf02
Teach BasicAA that a constant expression can't alias memory provably not
...
allocated until runtime (such as an alloca). Patch by Hans Wennborg!
llvm-svn: 88760
2009-11-14 06:15:14 +00:00
Evan Cheng
16797a1f55
Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
...
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Evan Cheng
6ad7da96fe
- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
...
- If destination is a physical register and it has a subreg index, use the
sub-register instead.
This fixes PR5423.
llvm-svn: 88745
2009-11-14 02:55:43 +00:00
Dan Gohman
81132465d3
Add an option for running GVN with redundant load processing disabled.
...
llvm-svn: 88742
2009-11-14 02:27:51 +00:00
Evan Cheng
e3b312fec9
Add radar number.
...
llvm-svn: 88739
2009-11-14 02:11:32 +00:00
Evan Cheng
d2c10508cd
Fix PR5412: Fix an inverted check and another missing sub-register check.
...
llvm-svn: 88738
2009-11-14 02:09:09 +00:00
Dan Gohman
a627e26d39
Enable the tail call optimization when the caller returns undef.
...
llvm-svn: 88737
2009-11-14 02:06:30 +00:00
Evan Cheng
66401c90da
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
...
llvm-svn: 88734
2009-11-14 01:50:00 +00:00
Jakob Stoklund Olesen
24b027401e
Fix bug in -split-phi-edges.
...
When splitting an edge after a machine basic block with fall-through, we
forgot to insert a jump instruction. Fix this by calling updateTerminator() on
the fall-through block when relevant.
Also be more precise in PHIElimination::isLiveIn.
llvm-svn: 88728
2009-11-14 00:38:13 +00:00
Jakob Stoklund Olesen
15ca009ee7
Update MachineDominator information
...
llvm-svn: 88727
2009-11-14 00:38:06 +00:00
Lang Hames
6b7233afc6
Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.
...
PreAllocSplitting is now using this API to insert code.
llvm-svn: 88725
2009-11-14 00:02:51 +00:00
Evan Cheng
78fa302e7d
Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
...
llvm-svn: 88719
2009-11-13 23:16:41 +00:00
Eric Christopher
96b26acd0f
Remove extraneous commit.
...
llvm-svn: 88716
2009-11-13 23:08:47 +00:00
Eric Christopher
0cabd30b22
Print out something, even if it's non-parseable later when we've
...
got ghost linkage. It's better than aborting.
llvm-svn: 88715
2009-11-13 23:00:14 +00:00
Dan Gohman
6e99014947
Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
...
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.
llvm-svn: 88711
2009-11-13 22:24:13 +00:00
Bill Wendling
6787318557
Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
...
emitFunctionStubAtAddr.
llvm-svn: 88708
2009-11-13 21:58:54 +00:00
Jakob Stoklund Olesen
ad205d6102
Fix PHIElimination optimization that uses MBB->getBasicBlock.
...
The BasicBlock associated with a MachineBasicBlock does not necessarily
correspond to the code in the MBB.
Don't insert a new IR BasicBlock when splitting critical edges. We are not
supposed to modify the IR during codegen, and we should be able to do just
fine with a NULL BB.
llvm-svn: 88707
2009-11-13 21:56:15 +00:00
Jakob Stoklund Olesen
27440e71fc
Add MachineFunction::verify() to call the machine code verifier directly.
...
llvm-svn: 88706
2009-11-13 21:56:09 +00:00
Jakob Stoklund Olesen
ff0302489b
The instruction pointer %RIP is a reserved register on x86_64.
...
llvm-svn: 88705
2009-11-13 21:56:01 +00:00
Jakob Stoklund Olesen
1ecc8b2de1
Fix polarity of a CFG check in machine verifier.
...
llvm-svn: 88704
2009-11-13 21:55:54 +00:00
Dan Gohman
7474546e4d
Use .data() instead of .c_str() when nul-termination is not needed.
...
llvm-svn: 88703
2009-11-13 21:55:31 +00:00
Devang Patel
452c1646c6
Do not use value handle to wrap MDNode in DIDescriptor.
...
llvm-svn: 88700
2009-11-13 21:45:04 +00:00
David Greene
659c1a9d78
Move DebugInfo checks into EmitComments and remove them from
...
target-specific AsmPrinters. Not all comments need DebugInfo.
Re-enable the line numbers comment test.
llvm-svn: 88697
2009-11-13 21:34:57 +00:00
Dan Gohman
225fa59cac
When optimizing for size, don't tail-merge unless it's likely to be a
...
code-size win, and not when it's only likely to be code-size neutral,
such as when only a single instruction would be eliminated and a new
branch would be required.
This fixes rdar://7392894.
llvm-svn: 88692
2009-11-13 21:02:15 +00:00
Evan Cheng
d190b8216f
Fix PR5410: LiveVariables lost subreg def:
...
D0<def,dead> = ...
...
= S0<use, kill>
S0<def> = ...
...
D0<def> =
The first D0 def is correctly marked dead, however, livevariables should have
added an implicit def of S0 or we end up with a use without a def.
llvm-svn: 88690
2009-11-13 20:36:40 +00:00
David Goodwin
b9fe5d5d02
Allow target to specify regclass for which antideps will only be broken along the critical path.
...
llvm-svn: 88682
2009-11-13 19:52:48 +00:00
Bruno Cardoso Lopes
a03b5b44fc
Support fp64 immediate zero, this fixes only part of PR5445
...
because the testcase is triggering one more bug.
llvm-svn: 88674
2009-11-13 18:49:59 +00:00
Dan Gohman
f80dc08059
Don't let a noalias difference disrupt the tailcall optimization.
...
llvm-svn: 88672
2009-11-13 18:49:38 +00:00
David Greene
a32c214b23
Remove duplicate APIs and state WRT spill objects.
...
llvm-svn: 87106
2009-11-13 14:42:06 +00:00
Rafael Espindola
ff2c72b858
Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
...
"a" + 0.
llvm-svn: 87084
2009-11-13 04:55:09 +00:00
Devang Patel
76a06074eb
Revert r87059 for now. It is failing clang tests.
...
llvm-svn: 87070
2009-11-13 02:27:33 +00:00
Devang Patel
97f99fa554
Ignore nameless variables.
...
llvm-svn: 87069
2009-11-13 02:25:26 +00:00
Rafael Espindola
7c6854995d
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
...
llvm-svn: 87068
2009-11-13 02:18:25 +00:00
Dale Johannesen
5f4eecf961
Adjust isConstantSplat to allow for big-endian targets.
...
PPC is such a target; make it work.
llvm-svn: 87060
2009-11-13 01:45:18 +00:00
Victor Hernandez
41e7648e09
Remove unnecessary llvm.dbg.declare bitcast
...
llvm-svn: 87059
2009-11-13 01:44:55 +00:00
Rafael Espindola
d554e44092
Add a new split method to StringRef that puts the substrings in a vector.
...
llvm-svn: 87058
2009-11-13 01:24:40 +00:00
Jim Grosbach
46a524c3e8
Block renumbering
...
llvm-svn: 87056
2009-11-13 01:19:24 +00:00
Jim Grosbach
969910b3e8
use lower case for readability
...
llvm-svn: 87054
2009-11-13 01:17:22 +00:00
Daniel Dunbar
3f75f5ddcb
Update test.
...
llvm-svn: 87049
2009-11-13 01:01:58 +00:00
David Greene
2f4c37425b
Fix a bootstrap failure.
...
Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE
interfaces to explicitly request checking for post-frame ptr elimination
operands. This uses a heuristic so it isn't reliable for correctness.
llvm-svn: 87047
2009-11-13 00:29:53 +00:00
Owen Anderson
e96b2111b1
Re-enable this code, since redundant PHIs are now being better nuked.
...
llvm-svn: 87042
2009-11-12 23:22:41 +00:00
Bill Wendling
c781d7a072
Simplify code a bit
...
llvm-svn: 87040
2009-11-12 23:13:08 +00:00
Bill Wendling
e412064c4c
Refactor code that checks if it's a call to a "nounwind" function.
...
llvm-svn: 87036
2009-11-12 21:59:20 +00:00
Chris Lattner
5c89f4b4ef
use isInstructionTriviallyDead, as pointed out by Duncan
...
llvm-svn: 87035
2009-11-12 21:58:18 +00:00
David Greene
033d65581d
Do some cleanups suggested by Chris.
...
llvm-svn: 87034
2009-11-12 21:49:55 +00:00
Daniel Dunbar
5fb4e7553c
StringRef(const char*) should not be used to turn null pointers into empty
...
strings.
llvm-svn: 87031
2009-11-12 21:26:11 +00:00
David Greene
7cf326aed4
Set the ReloadReuse AsmPrinter flag where appropriate.
...
llvm-svn: 87030
2009-11-12 21:07:54 +00:00
Daniel Dunbar
c71bf467d5
Remove my Value.h build fix.
...
llvm-svn: 87029
2009-11-12 21:07:02 +00:00
David Greene
f3ecd97cd8
Fix a build error by providing a missing enum value.
...
llvm-svn: 87028
2009-11-12 21:04:19 +00:00
David Greene
be851acfb0
Make the MachineFunction argument of getFrameRegister const.
...
This also fixes a build error.
llvm-svn: 87027
2009-11-12 21:00:03 +00:00
David Greene
70fdd57dc1
Add hasLoadFromStackSlot and hasStoreToStackSlot to return whether a
...
machine instruction loads or stores from/to a stack slot. Unlike
isLoadFromStackSlot and isStoreFromStackSlot, the instruction may be
something other than a pure load/store (e.g. it may be an arithmetic
operation with a memory operand). This helps AsmPrinter determine when
to print a spill/reload comment.
This is only a hint since we may not be able to figure this out in all
cases. As such, it should not be relied upon for correctness.
Implement for X86. Return false by default for other architectures.
llvm-svn: 87026
2009-11-12 20:55:29 +00:00
Daniel Dunbar
22b75873b9
Attempt to unbreak LLVM build, David G. please check.
...
llvm-svn: 87025
2009-11-12 20:53:56 +00:00
Daniel Dunbar
5026bc3a86
Fix -Asserts warning.
...
llvm-svn: 87024
2009-11-12 20:53:43 +00:00
Bill Wendling
e3ae25b3d8
If there's more than one function operand to a call instruction, be conservative
...
and don't assume that the call doesn't throw. It would be nice if there were a
way to determine which is the callee and which is a parameter. In practice, the
architecture we care about normally only have one operand for a call instruction
(x86 and arm).
llvm-svn: 87023
2009-11-12 20:51:53 +00:00
David Greene
1fbe054450
Add a bool flag to StackObjects telling whether they reference spill
...
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Benjamin Kramer
68e4945c03
Add compare_lower and equals_lower methods to StringRef. Switch all users of
...
StringsEqualNoCase (from StringExtras.h) to it.
llvm-svn: 87020
2009-11-12 20:36:59 +00:00
David Greene
81eb42d8ca
Make FixedStackPseudoSourceValue a first-class PseudoSourceValue by
...
making it visible to clients and adding LLVM-style cast capability.
This will be used by AsmPrinter to determine when to emit spill comments
for an instruction.
llvm-svn: 87019
2009-11-12 20:25:07 +00:00
David Greene
815863f157
Add AsmPrinter comment flags to machine instructions so that AsmPrinter
...
can emit extra information in comments.
llvm-svn: 87018
2009-11-12 20:21:09 +00:00
David Greene
33935767b9
Add comment flags so AsmPrinter can output additional information when
...
emitting comments. These flags carry semantic information not otherwise
easily derivable from the IR text.
llvm-svn: 87016
2009-11-12 20:13:34 +00:00
David Goodwin
da83f7d58b
Rename registers to break output dependencies in addition to anti-dependencies.
...
llvm-svn: 87015
2009-11-12 19:08:21 +00:00
Devang Patel
2904aa9f6e
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
...
llvm-svn: 87014
2009-11-12 19:02:56 +00:00
Dan Gohman
29271e7585
Mark DBG_LABEL, EH_LABEL, and GC_LABEL as not-duplicable, since
...
they really are not duplicable.
llvm-svn: 87009
2009-11-12 18:36:19 +00:00
Benjamin Kramer
3628bdab14
Silence a warning on targets with unsigned chars.
...
llvm-svn: 87002
2009-11-12 17:59:45 +00:00
Jim Grosbach
5d57714e6c
Update TB[BH] layout optimization. Add support for moving the target block
...
to directly follow the jump table. Move the layout changes to prior to any
constant island handling.
llvm-svn: 86999
2009-11-12 17:25:07 +00:00
Jim Grosbach
1025a4998b
Clean up testcase a bit. Simplify case blocks and adjust switch instruction to not take an undefined value as input.
...
llvm-svn: 86997
2009-11-12 17:19:09 +00:00
Nuno Lopes
f8fcac7470
fix crash in my previous patch
...
llvm-svn: 86987
2009-11-12 15:10:33 +00:00
Nuno Lopes
60d5b1cfdb
implement shl, ashr, and lshr methods. shl is not fully implemented as it is quite tricky.
...
llvm-svn: 86986
2009-11-12 14:53:53 +00:00
Benjamin Kramer
5218176bc6
Fix typo in run line.
...
llvm-svn: 86984
2009-11-12 12:35:27 +00:00
Gabor Greif
13431c6cdf
typo
...
llvm-svn: 86980
2009-11-12 09:44:17 +00:00
Chris Lattner
eb9acbfb05
implement a nice little efficiency hack in the inliner. Since we're now
...
running IPSCCP early, and we run functionattrs interlaced with the inliner,
we often (particularly for small or noop functions) completely propagate
all of the information about a call to its call site in IPSSCP (making a call
dead) and functionattrs is smart enough to realize that the function is
readonly (because it is interlaced with inliner).
To improve compile time and make the inliner threshold more accurate, realize
that we don't have to inline dead readonly function calls. Instead, just
delete the call. This happens all the time for C++ codes, here are some
counters from opt/llvm-ld counting the number of times calls were deleted vs
inlined on various apps:
Tramp3d opt:
5033 inline - Number of call sites deleted, not inlined
24596 inline - Number of functions inlined
llvm-ld:
667 inline - Number of functions deleted because all callers found
699 inline - Number of functions inlined
483.xalancbmk opt:
8096 inline - Number of call sites deleted, not inlined
62528 inline - Number of functions inlined
llvm-ld:
217 inline - Number of allocas merged together
2158 inline - Number of functions inlined
471.omnetpp:
331 inline - Number of call sites deleted, not inlined
8981 inline - Number of functions inlined
llvm-ld:
171 inline - Number of functions deleted because all callers found
629 inline - Number of functions inlined
Deleting a call is much faster than inlining it, and is insensitive to the
size of the callee. :)
llvm-svn: 86975
2009-11-12 07:56:08 +00:00
Evan Cheng
5d85a46f76
RegScavenger::enterBasicBlock should always reset register state.
...
llvm-svn: 86972
2009-11-12 07:49:10 +00:00
Evan Cheng
85a9f430e9
- Teach LSR to avoid changing cmp iv stride if it will create an immediate that
...
cannot be folded into target cmp instruction.
- Avoid a phase ordering issue where early cmp optimization would prevent the
later count-to-zero optimization.
- Add missing checks which could cause LSR to reuse stride that does not have
users.
- Fix a bug in count-to-zero optimization code which failed to find the pre-inc
iv's phi node.
- Remove, tighten, loosen some incorrect checks disable valid transformations.
- Quite a bit of code clean up.
llvm-svn: 86969
2009-11-12 07:35:05 +00:00
Evan Cheng
e129dd311e
Use table to separate opcode from operands.
...
llvm-svn: 86965
2009-11-12 07:16:34 +00:00
Evan Cheng
15b80e4a9f
isLegalICmpImmediate should take a signed integer; code clean up.
...
llvm-svn: 86964
2009-11-12 07:13:11 +00:00
Oscar Fuentes
700205c49f
CMake: Hopefully unbreak the build by mimicking the changes on the
...
other build system about the new C_INCLUDE_DIRS configure option.
llvm-svn: 86960
2009-11-12 06:48:09 +00:00
Rafael Espindola
d95960be25
Add the --with-c-include-dirs to llvm's configure.
...
The clang patch is next.
llvm-svn: 86955
2009-11-12 05:46:09 +00:00
Oscar Fuentes
d533e1d46b
CMake: Pass -lm to check_symbol_exists for detecting several math
...
functions like floorf, ceilf, ... Add test for detecting nearbyintf.
This change was prompted by test/Transforms/SimplifyLibCalls/floor.ll
llvm-svn: 86954
2009-11-12 05:36:09 +00:00
Chris Lattner
5f6b8b2bcb
use getPredicateOnEdge to fold comparisons through PHI nodes,
...
which implements GCC PR18046. This also gets us 360 more
jump threads on 176.gcc.
llvm-svn: 86953
2009-11-12 05:24:05 +00:00
Chris Lattner
22db4b5e0c
various fixes to the lattice transfer functions.
...
llvm-svn: 86952
2009-11-12 04:57:13 +00:00
Chris Lattner
c893c4ed10
switch jump threading to use getPredicateOnEdge in one place
...
making the new LVI stuff smart enough to subsume some special
cases in the old code. Disable them when LVI is around, the
testcase still passes.
llvm-svn: 86951
2009-11-12 04:37:50 +00:00
Chris Lattner
565ee2f1bd
Add a new getPredicateOnEdge method which returns more rich information for
...
constant constraints. Improve the LVI lattice to include inequality
constraints.
llvm-svn: 86950
2009-11-12 04:36:58 +00:00
Jim Grosbach
801b33b17c
Move the utility function UpdateTerminator() from CodePlacementOpt() into
...
MachineBasicBlock so other passes can utilize it.
llvm-svn: 86947
2009-11-12 03:55:33 +00:00
Jim Grosbach
6385ea7c4e
Revert 86857. It's causing consumer-typeset to fail, and there's a better way to do it forthcoming anyway.
...
llvm-svn: 86945
2009-11-12 03:28:35 +00:00
Eric Christopher
cb5e227373
Use stubs when we have them, otherwise use code we already have,
...
otherwise create a stub.
Add a test to make sure we don't create extraneous stubs.
llvm-svn: 86941
2009-11-12 03:12:18 +00:00
Daniel Dunbar
11881e2283
Add the braces gcc suggested.
...
llvm-svn: 86933
2009-11-12 02:52:56 +00:00
Nick Lewycky
9f3e73b0f6
Add CreateNUWAdd and CreateNUWSub to complement the existing CreateNSWAdd and
...
CreateNSWSub functions.
llvm-svn: 86930
2009-11-12 02:08:11 +00:00
Chris Lattner
380ccbaeaa
should not commit when distracted.
...
llvm-svn: 86929
2009-11-12 02:04:17 +00:00
Dan Gohman
a9b40a6eb4
Make the BranchFolderPass class local to BranchFolding.cpp.
...
llvm-svn: 86928
2009-11-12 01:59:26 +00:00
Chris Lattner
e2a63f2798
We now thread some impossible condition information with LVI.
...
llvm-svn: 86927
2009-11-12 01:55:20 +00:00
Dan Gohman
b3bf49f67e
Minor code cleanups.
...
llvm-svn: 86926
2009-11-12 01:51:28 +00:00
Chris Lattner
ba45616958
with the new code we can thread non-instruction values. This
...
allows us to handle the test10 testcase.
llvm-svn: 86924
2009-11-12 01:41:34 +00:00
Chris Lattner
3f80d85191
this argument can be an arbitrary value, it doesn't need to be an instruction.
...
llvm-svn: 86923
2009-11-12 01:37:43 +00:00
Chris Lattner
d5e25436a1
expose edge information and switch j-t to use it.
...
llvm-svn: 86920
2009-11-12 01:29:10 +00:00
Lang Hames
bff25cb044
Fixed an iteration condition in PreAllocSplitting. This should fix some miscompilations casued by PreAllocSplitting.
...
llvm-svn: 86919
2009-11-12 01:24:08 +00:00
Chris Lattner
b584d1e456
move some stuff into DEBUG's and turn on lazy-value-info for
...
the basic.ll testcase.
llvm-svn: 86918
2009-11-12 01:22:16 +00:00
Eric Christopher
ebbfbeef7d
Fix typo, cleanup whitespace.
...
llvm-svn: 86917
2009-11-12 01:06:08 +00:00
Devang Patel
862ef782de
Do not use StringRef in DebugInfo interface.
...
This allows StringRef to skip controversial if(str) check in constructor.
Buildbots, wait for corresponding clang and llvm-gcc FE check-ins!
llvm-svn: 86914
2009-11-12 00:50:58 +00:00
Dan Gohman
09478e975d
Tail merge at any size when there are two potentials blocks and one
...
can be made to fall through into the other.
llvm-svn: 86909
2009-11-12 00:39:10 +00:00
Bill Wendling
7a6b11e707
Don't mark a call as potentially throwing if the function it's calling has the
...
"nounwind" attribute.
llvm-svn: 86897
2009-11-11 23:17:02 +00:00
Bruno Cardoso Lopes
626d49f684
A real solution for the first part of PR5445
...
llvm-svn: 86895
2009-11-11 23:09:33 +00:00
Chris Lattner
19019eaf00
make LazyValueInfo actually to some stuff. This isn't very tested but improves
...
strswitch.
llvm-svn: 86889
2009-11-11 22:48:44 +00:00
Chris Lattner
67146695b6
pass TD into a SimplifyCmpInst call. Add another case that
...
uses LVI info when -enable-jump-threading-lvi is passed.
llvm-svn: 86886
2009-11-11 22:31:38 +00:00
Dan Gohman
02b155427e
Promote MergePotentialsElt and SameTailElt to be regular classes
...
instead of typedefs for std::pair. This simplifies the type of
SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator>
llvm-svn: 86885
2009-11-11 21:57:02 +00:00
Kenneth Uildriks
9f34406a90
x86 users can now return arbitrary sized structs. Structs too large to fit in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction.
...
llvm-svn: 86876
2009-11-11 19:59:24 +00:00
Dan Gohman
71782d59c7
Revert this line of 86871.
...
llvm-svn: 86875
2009-11-11 19:56:05 +00:00
Devang Patel
d41f119dac
If doesSupportDebugInformation() is false then do not try to emit dwarf debug info.
...
llvm-svn: 86874
2009-11-11 19:55:08 +00:00
Dan Gohman
34eeb4e983
Check in the changes to this file too.
...
llvm-svn: 86873
2009-11-11 19:49:34 +00:00
Dan Gohman
64b5d0f468
Add support for tail duplication to BranchFolding, and extend
...
tail merging support to handle more cases.
- Recognize several cases where tail merging is beneficial even when
the tail size is smaller than the generic threshold.
- Make use of MachineInstrDesc::isBarrier to help detect
non-fallthrough blocks.
- Check for and avoid disrupting fall-through edges in more cases.
llvm-svn: 86871
2009-11-11 19:48:59 +00:00
Jakob Stoklund Olesen
4f7fd3baeb
Fix liveness calculation when splitting critical edges during PHI elimination.
...
- Edges are split before any phis are eliminated, so the code is SSA.
- Create a proper IR BasicBlock for the split edges.
- LiveVariables::addNewBlock now has same syntax as
MachineDominatorTree::addNewBlock. Algorithm calculates predecessor live-out
set rather than successor live-in set.
This feature still causes some miscompilations.
llvm-svn: 86867
2009-11-11 19:31:31 +00:00
Devang Patel
addf8b1ac6
Reenable StackTracke.cpp test.
...
llvm-svn: 86861
2009-11-11 19:08:42 +00:00
Devang Patel
717b246b19
Add SetDebugLocation() variant to
...
add debug info location to an instruction.
llvm-svn: 86859
2009-11-11 19:06:06 +00:00
Evan Cheng
3d3c24a82c
Add TargetLowering::isLegalICmpImmediate. It tells LSR what immediate can be folded into target icmp instructions.
...
llvm-svn: 86858
2009-11-11 19:05:52 +00:00
Jim Grosbach
d576d66d91
Do jump table adjustment before constant island allocation
...
llvm-svn: 86857
2009-11-11 19:04:24 +00:00
Dan Gohman
16cfb9106e
Fix indentation level.
...
llvm-svn: 86856
2009-11-11 18:42:28 +00:00
Dan Gohman
c86b5a15f5
Whitespace cleanups.
...
llvm-svn: 86855
2009-11-11 18:38:14 +00:00
Dan Gohman
84bb28fc84
Prefix MBB numbers with "BB#" in debug output to make it clear what
...
the numbers mean.
llvm-svn: 86854
2009-11-11 18:23:17 +00:00
Dan Gohman
f4141f1dda
Minor code simplification.
...
llvm-svn: 86853
2009-11-11 18:18:34 +00:00
Dan Gohman
acc57b2446
Fix a copy+pasto in a comment.
...
llvm-svn: 86852
2009-11-11 18:14:02 +00:00
Dan Gohman
9fd22f68f2
Set isBarrier = 1 on return instructions, as they are control barriers.
...
llvm-svn: 86851
2009-11-11 18:11:07 +00:00
Dan Gohman
d2a0f80ede
Use a tab in INT3's asm string, for consistency.
...
llvm-svn: 86850
2009-11-11 18:07:16 +00:00
Chris Lattner
7a09964e81
another const prop failure.
...
llvm-svn: 86848
2009-11-11 17:54:02 +00:00
Chris Lattner
539bdf0487
add a note
...
llvm-svn: 86847
2009-11-11 17:51:27 +00:00
Chris Lattner
7eb84155a5
Reject duplicate case values in a switch, PR5450.
...
llvm-svn: 86846
2009-11-11 17:37:02 +00:00
Duncan Sands
ba61fed5d3
Don't trivially delete unused calls to llvm.invariant.start. This allows
...
llvm.invariant.start to be used without necessarily being paired with a call
to llvm.invariant.end. If you run the entire optimization pipeline then such
calls are in fact deleted (adce does it), but that's actually a good thing since
we probably do want them to be zapped late in the game. There should really be
an integration test that checks that the llvm.invariant.start call lasts long
enough that all passes that do interesting things with it get to do their stuff
before it is deleted. But since no passes do anything interesting with it yet
this will have to wait for later.
llvm-svn: 86840
2009-11-11 15:34:13 +00:00
Evan Cheng
7e5e40c75e
Add nounwind.
...
llvm-svn: 86814
2009-11-11 07:11:02 +00:00
Chris Lattner
852f2653c4
remove the now dead condprop pass, PR3906.
...
llvm-svn: 86810
2009-11-11 05:56:35 +00:00
Jeffrey Yasskin
e822c99eaa
Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo
...
by default).
llvm-svn: 86807
2009-11-11 05:30:02 +00:00
Chris Lattner
3e308fb0ee
remove condprop testcases.
...
llvm-svn: 86804
2009-11-11 05:25:16 +00:00
Daniel Dunbar
74bb710227
Add StringRef::split(StringRef), to complement StringRef::split(char).
...
llvm-svn: 86803
2009-11-11 05:19:11 +00:00
Rafael Espindola
cd6291506b
Remove dead code.
...
llvm-svn: 86802
2009-11-11 04:10:24 +00:00
Sandeep Patel
598825e832
Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
...
llvm-svn: 86797
2009-11-11 03:23:46 +00:00
Daniel Dunbar
6a77f51520
Add missing run line. Devang, please check.
...
llvm-svn: 86795
2009-11-11 03:10:03 +00:00
Daniel Dunbar
75b4d3562c
Fix -Asserts warning.
...
llvm-svn: 86794
2009-11-11 03:09:50 +00:00
Jim Grosbach
8d92ec45c7
The TBB and TBH instructions for Thumb2 are really handy for jump tables, but
...
can only branch forward. To best take advantage of them, we'd like to adjust
the basic blocks around a bit when reasonable. This patch puts basics in place
to do that, with a super-simple algorithm for backwards jump table targets that
creates a new branch after the jump table which branches backwards. Real
heuristics for reordering blocks or other modifications rather than inserting
branches will follow.
llvm-svn: 86791
2009-11-11 02:47:19 +00:00
Chris Lattner
fde1f8d0d8
stub out some LazyValueInfo interfaces, and have JumpThreading
...
start using them in a trivial way when -enable-jump-threading-lvi
is passed. enable-jump-threading-lvi will be my playground for
awhile.
llvm-svn: 86789
2009-11-11 02:08:33 +00:00
Bill Wendling
d656f8ec4c
Fix test to work on every platform.
...
llvm-svn: 86786
2009-11-11 01:44:22 +00:00
Bill Wendling
5831283cb5
Fix test to work on every platform.
...
llvm-svn: 86785
2009-11-11 01:41:32 +00:00
Devang Patel
b90dac093a
XFAIL for now.
...
llvm-svn: 86784
2009-11-11 01:41:10 +00:00
Bill Wendling
676f44062e
Make sure that the exception handling data has the same visibility as the
...
function it's generated for.
llvm-svn: 86779
2009-11-11 01:24:59 +00:00
Daniel Dunbar
9169a37daf
Add Triple::str() which returns the contents of the Triple as a string, as a more readable alternative to getTriple().
...
llvm-svn: 86773
2009-11-11 00:43:14 +00:00
Devang Patel
78319c67ca
Do not assume first function scope seen represents current function.
...
llvm-svn: 86771
2009-11-11 00:31:36 +00:00
Daniel Dunbar
9806e4ab20
Add From arguments to StringRef search functions, and tweak doxyments.
...
Also, add unittests for find_first_of and find_first_not_of.
llvm-svn: 86770
2009-11-11 00:28:53 +00:00
Daniel Dunbar
bc299f0092
llvm-gcc/clang don't (won't?) need this hack.
...
llvm-svn: 86769
2009-11-11 00:28:38 +00:00
Chris Lattner
6e960c8657
oops, didn't mean to commit this, no harm, but add a todoops, didn't mean to commit this, no harm, but add a todoo
...
llvm-svn: 86768
2009-11-11 00:27:54 +00:00
Chris Lattner
741c94c719
Stub out a new lazy value info pass, which will eventually
...
vend value constraint information to the optimizer.
llvm-svn: 86767
2009-11-11 00:22:30 +00:00
Chris Lattner
3a2ae908fe
add a fixme
...
llvm-svn: 86766
2009-11-11 00:21:58 +00:00
Chris Lattner
c4e03b7ac7
remove redundant foward declaration. This function is already in
...
Analysis/Passes.h
llvm-svn: 86765
2009-11-11 00:21:21 +00:00
Devang Patel
4450f26621
While creating DbgScopes, do not forget parent scope.
...
llvm-svn: 86763
2009-11-11 00:18:40 +00:00
Evan Cheng
12f146d8f7
Block terminator may be a switch.
...
llvm-svn: 86761
2009-11-11 00:00:21 +00:00
Chris Lattner
3835610902
jump threading does everything that condprop does any more. This passes
...
bootstrap on darwin i386.
llvm-svn: 86758
2009-11-10 23:54:10 +00:00
Chris Lattner
0169fd7c62
add a note
...
llvm-svn: 86756
2009-11-10 23:47:45 +00:00
Chris Lattner
8ff26038ef
I did this a week or two ago
...
llvm-svn: 86754
2009-11-10 23:40:49 +00:00
Devang Patel
cdb7d44d6d
Ignore variable if scope info is not available.
...
llvm-svn: 86753
2009-11-10 23:20:04 +00:00
Bill Wendling
47739b20fd
Test this on Darwin only.
...
llvm-svn: 86752
2009-11-10 23:18:33 +00:00
Dale Johannesen
6f7d5b22bb
Emit correct code when making a ConstantPool entry for a vector
...
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*). 7320806 (partial).
llvm-svn: 86751
2009-11-10 23:16:41 +00:00
Devang Patel
f6eeaebd76
Implement support to debug inlined functions.
...
llvm-svn: 86748
2009-11-10 23:06:00 +00:00
Chris Lattner
a5056f5b2b
in -dot-cfg and -dot-cfg-only, when rendering switch instructions,
...
put the switch value in the successor boxes like we put T/F for branches.
llvm-svn: 86747
2009-11-10 22:56:15 +00:00
Chris Lattner
9518fbb54e
implement a TODO by teaching jump threading about "xor x, 1".
...
llvm-svn: 86739
2009-11-10 22:39:16 +00:00
Chris Lattner
852d6d64ff
move some generally useful functions out of jump threading
...
into libanalysis and transformutils.
llvm-svn: 86735
2009-11-10 22:26:15 +00:00
Dan Gohman
de8d418ac3
Don't mark conditional branch instructions as control barriers.
...
llvm-svn: 86732
2009-11-10 22:16:57 +00:00
Bill Wendling
fc9469f311
Modify how the prologue encoded the "move" information for the FDE. GCC
...
generates a sequence similar to this:
__Z4funci:
LFB2:
mflr r0
LCFI0:
stmw r30,-8(r1)
LCFI1:
stw r0,8(r1)
LCFI2:
stwu r1,-80(r1)
LCFI3:
mr r30,r1
LCFI4:
where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other
things are. We generated something more like this:
Leh_func_begin1:
mflr r0
stw r31, 20(r1)
stw r0, 8(r1)
Llabel1:
stwu r1, -80(r1)
Llabel2:
mr r31, r1
Note that we are missing the "mr" instruction. This patch makes it more like the
GCC output.
llvm-svn: 86729
2009-11-10 22:14:04 +00:00
Devang Patel
42c1d17dd1
Process InlinedAt location info.
...
Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic.
llvm-svn: 86727
2009-11-10 22:05:35 +00:00
Chris Lattner
02e2cee7dc
fix a crash in SCCP handling extractvalue of an array, pointed out and
...
tracked down by Stephan Reiter!
llvm-svn: 86726
2009-11-10 22:02:09 +00:00
Jakob Stoklund Olesen
4453dc976b
Teach PHIElimination to split critical edges when -split-phi-edges is enabled.
...
Critical edges leading to a PHI node are split when the PHI source variable is
live out from the predecessor block. This help the coalescer eliminate more
PHI joins.
llvm-svn: 86725
2009-11-10 22:01:05 +00:00
Jakob Stoklund Olesen
19f235e455
Refactoring: Extract method PHIElimination::isLiveOut().
...
Clean up some whitespace.
No functional changes.
llvm-svn: 86724
2009-11-10 22:00:56 +00:00
Chris Lattner
40b15f220d
improve comment.
...
llvm-svn: 86723
2009-11-10 21:45:09 +00:00
Chris Lattner
80e7e5a429
Make jump threading eliminate blocks that just contain phi nodes,
...
debug intrinsics, and an unconditional branch when possible. This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
llvm-svn: 86722
2009-11-10 21:40:01 +00:00
Evan Cheng
87fe40b32d
Generalize lsr code that optimize loop to count down towards zero.
...
llvm-svn: 86715
2009-11-10 21:14:05 +00:00
Dan Gohman
1f31f6e265
Optimize test more.
...
llvm-svn: 86714
2009-11-10 21:02:18 +00:00
Victor Hernandez
bb336a1987
make this handle redefinition of malloc function with different prototype correctly
...
llvm-svn: 86712
2009-11-10 19:53:28 +00:00
Evan Cheng
e034867587
Change Thumb1 address mode printing, instead of
...
[r0, #2 * 4]
Now
[r0, #8 ]
This makes Thumb2 assembly more uniform and frankly the scale doesn't add much.
llvm-svn: 86707
2009-11-10 19:48:13 +00:00
Evan Cheng
e6548f4106
Add a comment.
...
llvm-svn: 86706
2009-11-10 19:44:56 +00:00
Duncan Sands
23344095de
Add defensive break.
...
llvm-svn: 86705
2009-11-10 19:36:40 +00:00
Daniel Dunbar
b9415c7d9a
Add a monstrous hack to improve X86ISelDAGToDAG compile time.
...
- Force NDEBUG on in any Release build. This drops the compile time to ~100s
from ~600s, in Release mode.
- This may just be a temporary workaround, I don't know the true nature of the
gcc-4.2 compile time performance problem.
llvm-svn: 86695
2009-11-10 18:24:37 +00:00
Duncan Sands
8d4cde2b55
Fix obvious typo.
...
llvm-svn: 86694
2009-11-10 18:21:37 +00:00
Chris Lattner
b8f79ba10e
clarify logic.
...
llvm-svn: 86689
2009-11-10 17:00:47 +00:00
Douglas Gregor
66df54f92c
CMake: Add Darwin-specific linker flags for building loadable modules
...
llvm-svn: 86684
2009-11-10 15:30:33 +00:00
Duncan Sands
1925d3a1d1
Teach DSE to eliminate useless trampolines.
...
llvm-svn: 86683
2009-11-10 13:49:50 +00:00
Duncan Sands
04e0c95248
Add brackets to make gcc-4.4 happy.
...
llvm-svn: 86681
2009-11-10 09:32:10 +00:00
Duncan Sands
dca0c28452
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
...
just throw them away.
llvm-svn: 86678
2009-11-10 09:08:09 +00:00
Victor Hernandez
fcc77b1c02
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
...
llvm-svn: 86676
2009-11-10 08:32:25 +00:00
Victor Hernandez
4744488e8d
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
...
llvm-svn: 86675
2009-11-10 08:28:35 +00:00
Chris Lattner
17529ac0c5
optimize test
...
llvm-svn: 86672
2009-11-10 07:44:36 +00:00
Chris Lattner
1559bedcc7
unify the code that determines whether it is a good idea to change the type
...
of a computation. This fixes some infinite loops when dealing with TD that
has no native types.
llvm-svn: 86670
2009-11-10 07:23:37 +00:00
Nick Lewycky
5b3def9b86
Simplify.
...
llvm-svn: 86668
2009-11-10 07:00:43 +00:00
Nick Lewycky
9027147fb1
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
...
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
llvm-svn: 86667
2009-11-10 06:46:40 +00:00
Chris Lattner
cbd18fc93d
refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.
...
llvm-svn: 86666
2009-11-10 05:59:26 +00:00
Oscar Fuentes
bbc1067001
CMake: Support for building llvm loadable modules.
...
llvm-svn: 86656
2009-11-10 02:45:37 +00:00
Daniel Dunbar
5a5b223c04
lit: Start documentation testing architecture.
...
llvm-svn: 86655
2009-11-10 02:41:27 +00:00
Daniel Dunbar
8acffa7dd5
lit: Add ExampleTests, for testing lit and demonstrating test suite features.
...
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
4010a04034
lit: Fix bug in --show-suites which accidentally override the list of tests.
...
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Bruno Cardoso Lopes
05671ea10a
Fix PR5445
...
llvm-svn: 86651
2009-11-10 02:35:13 +00:00
Chris Lattner
ab799110c6
I misread the parens, not so redundant after all.
...
llvm-svn: 86648
2009-11-10 02:04:54 +00:00
Chris Lattner
38c44ea6b0
make jump threading recursively simplify expressions instead of doing it
...
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
llvm-svn: 86646
2009-11-10 01:57:31 +00:00
Chris Lattner
ee89d5a4d0
remove some redundant parens.
...
llvm-svn: 86645
2009-11-10 01:56:04 +00:00
Oscar Fuentes
b8d7793628
CMake: Remove unnecessary `unset' which was not supported by old cmake
...
releases.
llvm-svn: 86644
2009-11-10 01:45:05 +00:00
Dan Gohman
42cc1806d8
Remove an unused variable.
...
llvm-svn: 86642
2009-11-10 01:37:57 +00:00
Dan Gohman
48079d4bf5
Minor code simplification.
...
llvm-svn: 86641
2009-11-10 01:36:20 +00:00
Dan Gohman
0d401124d1
Trim a bunch of unneeded code from this testcase.
...
llvm-svn: 86640
2009-11-10 01:33:08 +00:00
Chris Lattner
be11db6894
don't invalidate PN, rewrite of this code is in progress anyway.
...
llvm-svn: 86639
2009-11-10 01:19:06 +00:00
Chris Lattner
fb7f87d5a3
add a new SimplifyInstruction API, which is like ConstantFoldInstruction,
...
except that the result may not be a constant. Switch jump threading to
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.
llvm-svn: 86637
2009-11-10 01:08:51 +00:00
Jeffrey Yasskin
b40d3f76a0
Fix DenseMap iterator constness.
...
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
llvm-svn: 86636
2009-11-10 01:02:17 +00:00
Chris Lattner
a71e9d61be
factor simplification logic for AND and OR out to InstSimplify from instcombine.
...
llvm-svn: 86635
2009-11-10 00:55:12 +00:00
David Goodwin
0d412c2528
Fixed to address code review. No functional changes.
...
llvm-svn: 86634
2009-11-10 00:48:55 +00:00
Daniel Dunbar
124fc5e252
Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.
...
Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.
llvm-svn: 86630
2009-11-10 00:43:58 +00:00
David Goodwin
cf89db135e
Allow targets to specify register classes whose member registers should not be renamed to break anti-dependencies.
...
llvm-svn: 86628
2009-11-10 00:15:47 +00:00
Chris Lattner
ccfdceb22c
pull a bunch of logic out of instcombine into instsimplify for compare
...
simplification, this handles the foldable fcmp x,x cases among many others.
llvm-svn: 86627
2009-11-09 23:55:12 +00:00
Dan Gohman
2ac504729b
Pass the (optional) TargetData object to ConstantFoldInstOperands
...
and ConstantFoldCompareInstOperands.
llvm-svn: 86626
2009-11-09 23:34:17 +00:00
Chris Lattner
beadc6e8c7
inline a simple function.
...
llvm-svn: 86625
2009-11-09 23:31:49 +00:00
Chris Lattner
c1f19071f8
rename SimplifyCompare -> SimplifyCmpInst and split it into
...
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to
determine whether a predicate is fp or int.
llvm-svn: 86624
2009-11-09 23:28:39 +00:00
Jim Grosbach
2524b04d0e
Now that the default is 'enabled,' a separate command line option for ARM is
...
not necessary.
llvm-svn: 86621
2009-11-09 23:11:45 +00:00
Mike Stump
f8a74fc4a5
Add testcase for recent checkin.
...
llvm-svn: 86620
2009-11-09 23:10:49 +00:00
Chris Lattner
cdfb80de16
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
...
individual operands instead of taking a temporary array
llvm-svn: 86619
2009-11-09 23:06:58 +00:00
Daniel Dunbar
3f94a132dd
Add StringSwitch::Cases overloads, for matching multiple strings to a single
...
value.
llvm-svn: 86618
2009-11-09 23:05:44 +00:00
Chris Lattner
800aad3dda
use instructionsimplify instead of a weak clone of ad-hoc folding stuff.
...
llvm-svn: 86616
2009-11-09 23:00:14 +00:00
Jim Grosbach
47e3bcf180
Update test
...
llvm-svn: 86614
2009-11-09 22:59:01 +00:00
Chris Lattner
084a1b5581
stub out a new libanalysis "instruction simplify" interface that
...
takes decimated instructions and applies identities to them. This
is pretty minimal at this point, but I plan to pull some instcombine
logic out into these and similar routines.
llvm-svn: 86613
2009-11-09 22:57:59 +00:00
Jeffrey Yasskin
8483f12ac5
Remove dlsym stubs, with Nate Begeman's permission.
...
llvm-svn: 86606
2009-11-09 22:34:19 +00:00
Jim Grosbach
1218b804fb
Enable dynamic stack realignment by default.
...
llvm-svn: 86604
2009-11-09 22:32:40 +00:00
Chris Lattner
2978ca7b79
stub out a new form of BasicBlock::RemovePredecessorAndSimplify which
...
simplifies instruction users of PHIs when the phi is eliminated. This
will be moved to transforms/utils after some other refactoring.
llvm-svn: 86603
2009-11-09 22:32:36 +00:00
Jim Grosbach
55d3480769
Set dynamic stack realignment to real values.
...
llvm-svn: 86602
2009-11-09 22:32:03 +00:00
Dan Gohman
a951526510
Remove an unneeded #include.
...
llvm-svn: 86601
2009-11-09 22:28:30 +00:00
Mike Stump
f04c4cdb27
Fix for 64-bit builds.
...
llvm-svn: 86600
2009-11-09 22:28:21 +00:00
Bill Wendling
787997f77e
Similar to r86588, but for Darwin this time.
...
llvm-svn: 86592
2009-11-09 21:45:26 +00:00
Bill Wendling
7307bff420
The jump table was being generated before the end label for exception handling
...
was generated. This caused code like this:
## The asm code for the function
.section __TEXT,__const
.align 2
lJTI11_0:
LJTI11_0:
.long LBB11_16
.long LBB11_4
.long LBB11_5
.long LBB11_6
.long LBB11_7
.long LBB11_8
.long LBB11_9
.long LBB11_10
.long LBB11_11
.long LBB11_12
.long LBB11_13
.long LBB11_14
Leh_func_end11: ## <---now in the wrong section!
The `Leh_func_end11' would then end up in the wrong section, causing the
resulting EH frame information to be wrong:
__ZL11CheckRightsjPKcbRbRP6NSData.eh:
.set Lset500eh,Leh_frame_end11-Leh_frame_begin11
.long Lset500eh ; Length of Frame Information Entry
Leh_frame_begin11:
.long Leh_frame_begin11-Leh_frame_common
.long Leh_func_begin11-.
.set Lset501eh,Leh_func_end11-Leh_func_begin11
.long Lset501eh ; FDE address range
`Lset501eh' is now something huge instead of the real value.
The X86 back-end generates the jump table after the EH information is
emitted. Do the same here.
llvm-svn: 86588
2009-11-09 21:20:14 +00:00
Dan Gohman
2745d19287
Print "..." instead of all the uninteresting register clobbers on call
...
instructions. This makes CodeGen dumps significantly less noisy.
Example before:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def,dead>, %D1<imp-def,dead>, %D2<imp-def,dead>, %D3<imp-def,dead>, %D4<imp-def,dead>, %D5<imp-def,dead>, %D6<imp-def,dead>, %D7<imp-def,dead>, %D16<imp-def,dead>, %D17<imp-def,dead>, %D18<imp-def,dead>, %D19<imp-def,dead>, %D20<imp-def,dead>, %D21<imp-def,dead>, %D22<imp-def,dead>, %D23<imp-def,dead>, %D24<imp-def,dead>, %D25<imp-def,dead>, %D26<imp-def,dead>, %D27<imp-def,dead>, %D28<imp-def,dead>, %D29<imp-def,dead>, %D30<imp-def,dead>, %D31<imp-def,dead>, %CPSR<imp-def,dead>, %FPSCR<imp-def,dead>
Same example after:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %LR<imp-def,dead>, %CPSR<imp-def,dead>, ...
llvm-svn: 86583
2009-11-09 19:38:45 +00:00
Dan Gohman
ccb4584edd
Default-addressspace null pointers don't alias anything. This allows
...
GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me)
llvm-svn: 86582
2009-11-09 19:29:11 +00:00
David Goodwin
d2f9c044c0
Fix dependencies added to model memory aliasing for post-RA scheduling. The dependencies were overly conservative for memory access that are known not to alias.
...
llvm-svn: 86580
2009-11-09 19:22:17 +00:00
Dan Gohman
c74bc28297
The inbounds keyword isn't relevant to overindexing of
...
static array types. Thanks to Duncan for pointing this out!
llvm-svn: 86576
2009-11-09 19:01:53 +00:00
Dan Gohman
f324dd65f8
Fix a comment in a typo that Duncan noticed.
...
llvm-svn: 86575
2009-11-09 18:59:22 +00:00
Dan Gohman
66c4d61010
Remove the "special case" for zero-length arrays, and rephrase this
...
paragraph to be more precise.
llvm-svn: 86572
2009-11-09 18:40:39 +00:00
Dan Gohman
c146c78060
Generalize LCSSA to handle loops with exits with predecessors outside
...
the loop. This is needed because with indirectbr it may not be possible
for LoopSimplify to guarantee that all loop exit predecessors are
inside the loop. This fixes PR5437.
LCCSA no longer actually requires LoopSimplify form, but for now it
must still have the dependency because the PassManager doesn't know
how to schedule LoopSimplify otherwise.
llvm-svn: 86569
2009-11-09 18:28:24 +00:00
Dan Gohman
85b5bf833e
Fix an 80-column violation.
...
llvm-svn: 86567
2009-11-09 18:20:38 +00:00
Dan Gohman
5196e415ad
Minor tidiness fixes.
...
llvm-svn: 86565
2009-11-09 18:19:43 +00:00
Dan Gohman
6f67f8902a
Constify MachineFunctionAnalysis' TargetMachine reference.
...
llvm-svn: 86564
2009-11-09 18:18:49 +00:00
Dan Gohman
968ecd9888
Fix a comment.
...
llvm-svn: 86558
2009-11-09 17:06:51 +00:00
Dan Gohman
1c311a8cd7
Suppress implicit copy ctor and copy assignment for MachineFunction.
...
llvm-svn: 86557
2009-11-09 17:06:23 +00:00
Daniel Dunbar
3488819495
Use ',' separation in XFAILs, lit doesn't evaluate them as regexs (easy to add,
...
but might as well use the more standard syntax).
llvm-svn: 86553
2009-11-09 16:38:15 +00:00
Nuno Lopes
640eb70bee
add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
...
llvm-svn: 86549
2009-11-09 15:36:28 +00:00
Jim Grosbach
ad95414c26
Work around assembler not recognizing #0.0 form immediate for vmcp
...
llvm-svn: 86548
2009-11-09 15:27:51 +00:00
Oscar Fuentes
de8f431edf
CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
...
Patch by Arnaud Allard de Grandmaison!
llvm-svn: 86547
2009-11-09 15:26:40 +00:00
Xerxes Ranby
7c16a89ebf
Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
...
llvm-svn: 86544
2009-11-09 14:50:34 +00:00
Bruno Cardoso Lopes
8dd7c54a42
Fix PR5149.
...
http://llvm.org/bugs/show_bug.cgi?id=5149
llvm-svn: 86543
2009-11-09 14:27:49 +00:00
Chris Lattner
2156c22b3c
make this handle redefinition of malloc with different prototype correctly.
...
llvm-svn: 86525
2009-11-09 07:12:01 +00:00
Chris Lattner
39c07b2eef
if a 'with overflow' intrinsic just has the normal result used, simplify
...
it to a normal binop. Patch by Alastair Lynn, testcase by me.
llvm-svn: 86524
2009-11-09 07:07:56 +00:00
Evan Cheng
ad7c6124e7
Hide a couple of options.
...
llvm-svn: 86522
2009-11-09 06:49:37 +00:00
Evan Cheng
ce29331e10
80 col.
...
llvm-svn: 86521
2009-11-09 06:49:22 +00:00
Chris Lattner
feeabde753
fix PR5104: when printing a single character, return the result of
...
putchar in case there is an error.
llvm-svn: 86515
2009-11-09 04:57:04 +00:00
Chris Lattner
077166e3fa
fix some bogus asserts, PR5049
...
llvm-svn: 86514
2009-11-09 04:47:27 +00:00
Chris Lattner
d1c4e75750
random tidy
...
llvm-svn: 86511
2009-11-09 04:18:23 +00:00
Chris Lattner
275dd8b0af
remove a redundant printout, LinkInArchive prints this as well.
...
llvm-svn: 86510
2009-11-09 04:15:28 +00:00
Chris Lattner
0685be3441
enhance PHI slicing to handle the case when a slicable PHI is begin
...
used by a chain of other PHIs.
llvm-svn: 86503
2009-11-09 01:38:00 +00:00
Owen Anderson
939ea35244
Small cleanups.
...
llvm-svn: 86499
2009-11-09 00:48:15 +00:00
Owen Anderson
73fc616838
Revert my previous patch to ABCD and fix things the right way. There are two problems addressed
...
here:
1) We need to avoid processing sigma nodes as phi nodes for constraint generation.
2) We need to generate constraints for comparisons against constants properly.
This includes our first working ABCD test!
llvm-svn: 86498
2009-11-09 00:44:44 +00:00
Chris Lattner
ea465e221e
comment typos pointed out by Duncan
...
llvm-svn: 86497
2009-11-09 00:41:49 +00:00
Jim Grosbach
d7cf55cd0e
Use Unified Assembly Syntax for the ARM backend.
...
llvm-svn: 86494
2009-11-09 00:11:35 +00:00
Owen Anderson
058088f219
Fix an issue where the ordering of blocks within a function could lead to different constraint
...
graphs being produced. The cause was that we were incorrectly marking sigma instructions as
processed after handling the sigma-specific constraints for them, potentially neglecting to
process them as normal instructions as well.
Unfortunately, the testcase that inspired this still doesn't work because of a bug in the solver,
which is next on the list to debug.
llvm-svn: 86486
2009-11-08 22:36:55 +00:00
Daniel Dunbar
2edf3a4896
Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
...
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.
For use by buildbots when people insist on making cc1 infinite loop. :)
llvm-svn: 86484
2009-11-08 21:51:53 +00:00
Chris Lattner
2299d4b6d8
Teach an instcombine to not pull trunc instructions through PHI nodes
...
when both the source and dest are illegal types, since it would cause
the phi to grow (for example, we shouldn't transform test14b's phi to
a phi on i320). This fixes an infinite loop on i686 bootstrap with
phi slicing turned on, so turn it back on.
llvm-svn: 86483
2009-11-08 21:20:06 +00:00
Duncan Sands
fec62f0ef5
Revert commit 81144, and add a comment. It caused bugpoint timeouts
...
not to work any more on linux.
llvm-svn: 86481
2009-11-08 20:55:48 +00:00
Chris Lattner
a837e4db6b
reapply r8644[3-5] with only the scary part
...
(SliceUpIllegalIntegerPHI) disabled.
llvm-svn: 86480
2009-11-08 19:23:30 +00:00
Daniel Dunbar
4c41373c56
Speculatively revert r8644[3-5], they seem to be leading to infinite loops in
...
llvm-gcc bootstrap.
llvm-svn: 86478
2009-11-08 17:52:47 +00:00
Anton Korobeynikov
700c4ab3f9
Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
...
llvm-svn: 86471
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
e92c508764
Move OR patterns upper to all logical stuff. No functionality change.
...
llvm-svn: 86470
2009-11-08 15:32:44 +00:00
Anton Korobeynikov
a404d61c8e
Some nice peephole patterns. Based on patch by Brian Lucas!
...
llvm-svn: 86469
2009-11-08 15:32:28 +00:00
Anton Korobeynikov
fd9a893cab
Print tab before operand of jcc
...
llvm-svn: 86468
2009-11-08 15:32:11 +00:00
Anton Korobeynikov
4ca8d3a6a6
Fix invalid operand updates & implement post-inc memory operands
...
llvm-svn: 86466
2009-11-08 14:27:38 +00:00
Anton Korobeynikov
eb8692cff9
Throw an error when stack realignment stuff fails instead of silent
...
code miscompilation
llvm-svn: 86463
2009-11-08 12:58:40 +00:00
Anton Korobeynikov
dc2beaa05e
It is invalid to infer the value type from the result #0 of the node
...
since the instruction might use the other result of different type.
llvm-svn: 86462
2009-11-08 12:14:54 +00:00
Daniel Dunbar
dc3fcfc0d0
Remove ByteswapSCANFResults, it is dead.
...
llvm-svn: 86458
2009-11-08 09:46:57 +00:00
Daniel Dunbar
e34c1d8b44
NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
...
handled by buildbots now.
llvm-svn: 86454
2009-11-08 09:34:14 +00:00
Daniel Dunbar
e9bbafe1eb
Two small fixes for site.exp for cmake.
...
llvm-svn: 86453
2009-11-08 09:29:52 +00:00
Daniel Dunbar
84bc8c3058
Derive the right paths to use during testing instead of passing it in via make.
...
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.
llvm-svn: 86452
2009-11-08 09:08:00 +00:00
Daniel Dunbar
0ab04bc27e
Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
...
and generate it for CMake builds as well.
llvm-svn: 86451
2009-11-08 09:07:51 +00:00
Daniel Dunbar
bf7afbaaaf
Cleanup some unused RUN lines.
...
llvm-svn: 86450
2009-11-08 09:07:42 +00:00
Daniel Dunbar
42c19ee140
lit: Hardcode whence seek value, os.SEEK_END isn't always available.
...
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
3d861af58a
lit: Warn when a test suite contains no tests.
...
llvm-svn: 86448
2009-11-08 09:07:26 +00:00