Jeffrey Yasskin
db5f24ce77
Make the need-stub variables accurate and consistent. In the case of
...
MachineRelocations, "stub" always refers to a far-call stub or a
load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs
are used for lazy compilation and dlsym address replacement.) The variable was
also inconsistent between the positive and negative sense, and the positive
sense ("NeedStub") was more demanding than is accurate (since a nearby-enough
function can be called directly even if the platform often requires a stub).
Since the negative sense causes double-negatives, I switched to
"MayNeedFarStub" globally.
llvm-svn: 86363
2009-11-07 08:51:52 +00:00
Eric Christopher
bd05185ef1
Fix a couple of shuffle patterns to use movhlps instead
...
of movhps as the constraint. Changes optimizations so
update testcases as appropriate as well.
llvm-svn: 86360
2009-11-07 08:45:53 +00:00
Nick Lewycky
b6a3dd48f4
Teach dead store elimination that certain intrinsics write to memory just like
...
a store.
llvm-svn: 86359
2009-11-07 08:34:40 +00:00
Chris Lattner
c76ce9f208
remove the win32 tree, it's stale and confusing.
...
llvm-svn: 86358
2009-11-07 08:31:52 +00:00
Chris Lattner
5ff7f5672e
reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
...
(making pred factoring only happen if threading is guaranteed
to be successful).
This now survives an X86-64 bootstrap of llvm-gcc.
llvm-svn: 86355
2009-11-07 08:05:03 +00:00
Chris Lattner
8e1d7222a7
Fix PR5421 by APInt'izing switch lowering.
...
llvm-svn: 86354
2009-11-07 07:50:34 +00:00
Nick Lewycky
9b669b3c4f
Oops, FunctionContainsEscapingAllocas is really used to mean two different
...
things. Back out part of r86349 for a moment.
llvm-svn: 86353
2009-11-07 07:42:38 +00:00
Nick Lewycky
5091272fdf
Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
...
and add a .ll to demo the new capability.
llvm-svn: 86349
2009-11-07 07:10:01 +00:00
Mikhail Glushenkov
0fa9474836
llvmc: Add a '-time' option.
...
llvm-svn: 86348
2009-11-07 06:33:58 +00:00
Mikhail Glushenkov
358607dfa3
Trailing whitespace.
...
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Mikhail Glushenkov
b53593d320
80-col violation.
...
llvm-svn: 86346
2009-11-07 06:33:01 +00:00
Chris Lattner
74ab6efbe8
merge cmp1 into cmp0 and filecheckize.
...
llvm-svn: 86345
2009-11-07 06:19:20 +00:00
Lang Hames
bc247dce4d
Update some globals to use ManagedStatic.
...
llvm-svn: 86342
2009-11-07 05:50:28 +00:00
Mon P Wang
fc032ced22
Fix memoizing of CvtRndSatSDNode
...
llvm-svn: 86340
2009-11-07 04:46:25 +00:00
Mon P Wang
5321dd8823
Fixed Overload table bug noticed by Jakob
...
llvm-svn: 86332
2009-11-07 04:07:33 +00:00
Evan Cheng
16e1c31da2
Missed this.
...
llvm-svn: 86331
2009-11-07 04:07:30 +00:00
Evan Cheng
a8e8a7c976
Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
...
llvm-svn: 86330
2009-11-07 04:04:34 +00:00
Evan Cheng
7ff831962a
- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
...
except it doesn't care if the definitions' virtual registers differ. This is
used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
Since pc relative constantpool entries are always different, this requires it
it check if the values can actually the same.
llvm-svn: 86328
2009-11-07 03:52:02 +00:00
Ted Kremenek
50dddc8b07
Update CMake file.
...
llvm-svn: 86325
2009-11-07 03:26:59 +00:00
Kenneth Uildriks
07119737aa
Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers
...
llvm-svn: 86324
2009-11-07 02:11:54 +00:00
Jakob Stoklund Olesen
4141d8ee92
Fix inverted conflict test in -early-coalesce.
...
A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.
Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.
llvm-svn: 86322
2009-11-07 01:58:40 +00:00
Devang Patel
3a42e7ac65
Revert following patches to fix llvmgcc bootstrap.
...
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.
llvm-svn: 86321
2009-11-07 01:32:59 +00:00
Johnny Chen
3467dcb12d
My previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
...
was wrong and too aggressive in the sense that DPSoRegFrm includes both constant
shifts (with Inst{4} = 0) and register controlled shifts (with Inst{4} = 1 and
Inst{7} = 0). The 'rr' fragment of the multiclass definitions actually means
register/register with no shift, see A8-11.
llvm-svn: 86319
2009-11-07 00:54:36 +00:00
Victor Hernandez
bde558c536
- new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
...
- fix ProcessInternalGlobal() debug output
llvm-svn: 86317
2009-11-07 00:41:19 +00:00
Victor Hernandez
e04ed0c68f
Fit in 80 columns
...
llvm-svn: 86316
2009-11-07 00:36:50 +00:00
Jeffrey Yasskin
8f77e948e5
Avoid "ambiguous 'else'" warning from gcc.
...
llvm-svn: 86314
2009-11-07 00:26:47 +00:00
Victor Hernandez
f3db915294
Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
...
Here is the original commit message:
This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.
Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86311
2009-11-07 00:16:28 +00:00
Jim Grosbach
79d70e3e65
80-columns
...
llvm-svn: 86310
2009-11-07 00:13:30 +00:00
Jeffrey Yasskin
ba78dcd90d
Give the JITResolver a direct pointer to its JITEmitter, and use that instead
...
of going through the global TheJIT variable. This makes it easier to use
features of JITEmitter that aren't in JITCodeEmitter for fixing PR5201.
llvm-svn: 86305
2009-11-07 00:00:10 +00:00
Evan Cheng
207b246650
- Add pseudo instructions tLDRpci_pic and t2LDRpci_pic which does a pc-relative
...
load of a GV from constantpool and then add pc. It allows the code sequence to
be rematerializable so it would be hoisted by machine licm.
- Add a late pass to break these pseudo instructions into a number of real
instructions. Also move the code in Thumb2 IT pass that breaks up t2MOVi32imm
to this pass. This is done before post regalloc scheduling to allow the
scheduler to proper schedule these instructions. It also allow them to be
if-converted and shrunk by later passes.
llvm-svn: 86304
2009-11-06 23:52:48 +00:00
Anton Korobeynikov
9df3acf486
Honour subreg machine operands during asmprinting
...
llvm-svn: 86303
2009-11-06 23:45:15 +00:00
Bob Wilson
d95ccd6c4d
Print VMOV (immediate) operands as hexadecimal values. Apple's assembler
...
will not accept negative values for these. LLVM's default operand printing
sign extends values, so that valid unsigned values appear as negative
immediates. Print all VMOV immediate operands as hex values to resolve this.
Radar 7372576.
llvm-svn: 86301
2009-11-06 23:33:28 +00:00
Chris Lattner
eb690feaef
Fix a bug where we'd call SplitBlockPredecessors with a pred in the
...
set only once even if it has multiple edges to BB.
llvm-svn: 86299
2009-11-06 23:19:58 +00:00
Bob Wilson
db42ca663b
Fix a broken test.
...
llvm-svn: 86298
2009-11-06 23:06:42 +00:00
Bob Wilson
b29e155c53
Fix comment typos.
...
llvm-svn: 86295
2009-11-06 22:38:38 +00:00
Evan Cheng
408aa56fb5
Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.
...
llvm-svn: 86294
2009-11-06 22:24:13 +00:00
Victor Hernandez
ce99780980
CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct calling convention
...
llvm-svn: 86290
2009-11-06 21:43:21 +00:00
Eli Friedman
a70917b2f4
Remove function left over from other jump threading cleanup.
...
llvm-svn: 86289
2009-11-06 21:24:57 +00:00
Gabor Greif
445737df6a
fix typo
...
llvm-svn: 86281
2009-11-06 20:10:46 +00:00
Chris Lattner
a8b9ce3f07
Fix a problem discovered on self host.
...
llvm-svn: 86278
2009-11-06 19:21:48 +00:00
Chris Lattner
d91a7960bf
remove more code subsumed by r86264
...
llvm-svn: 86270
2009-11-06 18:24:32 +00:00
Devang Patel
33e0c99d67
Tolerate invalid derived type.
...
llvm-svn: 86269
2009-11-06 18:24:05 +00:00
Chris Lattner
899ef22acb
eliminate some more code subsumed by r86264
...
llvm-svn: 86267
2009-11-06 18:22:54 +00:00
Chris Lattner
2f6184f6aa
remove now redundant code, r86264 handles this case.
...
llvm-svn: 86266
2009-11-06 18:20:58 +00:00
Chris Lattner
68d2417e05
Extend jump threading to support much more general threading
...
predicates. This allows us to jump thread things like:
_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
%tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ]
%toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0 ; <i1> [#uses=1]
%tmp4.i90 = icmp eq i32 %tmp2.i, 6 ; <i1> [#uses=1]
%or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90 ; <i1> [#uses=1]
br i1 %or.cond173, label %bb4.i96, label %_ZN12...
Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always
false. This triggers a surprisingly high number of times in the testsuite,
and gets us closer to generating good code for doug's strswitch testcase.
This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch. This survived an enable-checking llvm-gcc bootstrap.
llvm-svn: 86264
2009-11-06 18:15:14 +00:00
Dan Gohman
0080ee2d91
Use WriteAsOperand to print GlobalAddress MachineOperands. This
...
prints them with the leading '@'.
llvm-svn: 86261
2009-11-06 18:03:10 +00:00
Devang Patel
cc11371b77
Do not bother to emit debug info for nameless global variable.
...
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Daniel Dunbar
ad36e8aceb
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chris Lattner
81f1b31c96
clang++ points out that this is pointless.
...
llvm-svn: 86239
2009-11-06 06:33:01 +00:00
Chris Lattner
8c12bb8cd7
remove some more Context arguments.
...
llvm-svn: 86235
2009-11-06 05:59:53 +00:00
Chris Lattner
46b5c642b9
remove a bunch of extraneous LLVMContext arguments
...
from various APIs, addressing PR5325.
llvm-svn: 86231
2009-11-06 04:27:31 +00:00
Daniel Dunbar
529f913f55
NewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).
...
llvm-svn: 86229
2009-11-06 04:12:13 +00:00
Daniel Dunbar
04b3960bfe
NewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building LLVM (for testing).
...
Also, switch to always running 'make clean' in the test-suite directories.
llvm-svn: 86228
2009-11-06 04:12:07 +00:00
Daniel Dunbar
9e0febb2c7
NewNightlyTest: Unbreak passing the build directory via a positional argument.
...
llvm-svn: 86227
2009-11-06 04:12:02 +00:00
Daniel Dunbar
545ffe6fc1
NewNightlyTest: Add -llvmgccdir as alternative to environment variable.
...
llvm-svn: 86226
2009-11-06 04:11:29 +00:00
Victor Hernandez
b9f5899779
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
...
llvm-svn: 86213
2009-11-06 01:33:24 +00:00
Devang Patel
06ce6506d2
Do not try to emit debug info entry for dead global variable.
...
llvm-svn: 86212
2009-11-06 01:30:04 +00:00
Dan Gohman
701e4e9b2b
Don't print a redundant tab for inline asm, and do use the new printKill.
...
llvm-svn: 86206
2009-11-06 00:19:43 +00:00
Douglas Gregor
140db51755
Add a bunch of missing "template" keywords to disambiguate dependent template names. GCC eats this ill-formed code, Clang does not. I already filed PR5404 to improve recovery in this case
...
llvm-svn: 86204
2009-11-06 00:12:53 +00:00
Eric Christopher
80f04dc67d
Fix PR5315, original patch by Nicolas Capens!
...
llvm-svn: 86203
2009-11-06 00:11:57 +00:00
Dan Gohman
ee8afcc59d
Factor out the printing of the leading tab into printInlineAsm.
...
llvm-svn: 86199
2009-11-06 00:04:54 +00:00
Dan Gohman
6791639910
Make printImplicitDef and printKill non-virtual, since they don't
...
need to be overridden.
llvm-svn: 86198
2009-11-06 00:04:05 +00:00
Dan Gohman
006f9353e1
Use SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
...
implicit zero-extend.
llvm-svn: 86196
2009-11-05 23:53:08 +00:00
Dan Gohman
a1bf0c0acc
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
...
llvm-svn: 86193
2009-11-05 23:34:59 +00:00
Dan Gohman
98693a3ac2
Update these tests for the new label names.
...
llvm-svn: 86192
2009-11-05 23:31:40 +00:00
Dan Gohman
d53b5cfe3f
Fix the label name generation for address-taken labels to avoid potential
...
problems with name collisions.
llvm-svn: 86189
2009-11-05 23:14:35 +00:00
Douglas Gregor
5632657208
Make a few more LLVM headers parsable as standalone headers.
...
Fix some problems with the hidden copy constructors for
ImmutableMap/ImmutableSet found by Clang++.
llvm-svn: 86186
2009-11-05 23:01:30 +00:00
Douglas Gregor
86a947dde9
Teach lit's SyntaxCheckTest two new tricks:
...
- skip .svn directories
- add a set of excluded filenames so we can easily skip tests
llvm-svn: 86185
2009-11-05 22:58:04 +00:00
Lang Hames
933c541270
Added support for renumbering existing index list elements. Removed some junk from the initial numbering code in runOnMachineFunction.
...
llvm-svn: 86184
2009-11-05 22:20:57 +00:00
Dan Gohman
928068a886
Avoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
...
on loops having dedicated exits, which LoopSimplify can no longer always
guarantee.
llvm-svn: 86181
2009-11-05 21:48:32 +00:00
Dan Gohman
dca7ac335b
LoopDeletion depends on loops having dedicated exits.
...
llvm-svn: 86180
2009-11-05 21:47:04 +00:00
Dan Gohman
1ef784db67
The introduction of indirectbr meant the introduction of
...
unsplittable critical edges, which means the introduction of
loops which cannot be transformed to LoopSimplify form. Fix
LoopSimplify to avoid transforming such loops into invalid
code.
llvm-svn: 86176
2009-11-05 21:14:46 +00:00
Dan Gohman
a83ac2d9e7
Update various Loop optimization passes to cope with the possibility that
...
LoopSimplify form may not be available.
llvm-svn: 86175
2009-11-05 21:11:53 +00:00
David Goodwin
bed7cb6c1d
Fix bug in aggressive antidep breaking; liveness was not updated correctly for regions that do not have antidep candidates.
...
llvm-svn: 86172
2009-11-05 21:06:09 +00:00
Dan Gohman
415c64ea3f
Teach LoopUnroll how to bail if LoopSimplify can't give it what it needs.
...
llvm-svn: 86164
2009-11-05 19:44:06 +00:00
Dan Gohman
d9fa1c9c1e
Call getAnalysis<LoopInfo> the normal way, instead of asking passed-in
...
LoopPassManager for it.
llvm-svn: 86163
2009-11-05 19:43:25 +00:00
Dan Gohman
b632705017
InstrTypes.h includes Instruction.h, so it's not necessary to include both.
...
llvm-svn: 86162
2009-11-05 19:42:20 +00:00
Dan Gohman
2267f8aa72
Fix IVUsers to avoid assuming that the loop has a unique backedge.
...
llvm-svn: 86161
2009-11-05 19:41:37 +00:00
Dan Gohman
885c46e387
Delete an unused member variable.
...
llvm-svn: 86160
2009-11-05 19:33:15 +00:00
Dan Gohman
e3a1706e33
Factor out the predicate code for loopsimplify form exit blocks into
...
a separate helper function.
llvm-svn: 86159
2009-11-05 19:21:41 +00:00
Oscar Fuentes
17feb2a9ee
CMake: Detect dotty.
...
Patch by Arnaud Allard de Grandmaison!
llvm-svn: 86153
2009-11-05 19:03:26 +00:00
Oscar Fuentes
1a0bfb6290
CMake: do not test for pthread and dl libraries on Windows (except
...
Cygwin). Fixes PR 5368.
llvm-svn: 86152
2009-11-05 18:57:56 +00:00
Dan Gohman
43bdc260d6
Avoid printing a redundant space in SDNode->dump().
...
llvm-svn: 86151
2009-11-05 18:49:11 +00:00
Dan Gohman
b15f4a1cbd
Remove uninteresting and confusing debug output.
...
llvm-svn: 86149
2009-11-05 18:47:09 +00:00
Douglas Gregor
e076030f0c
Move llvm: 🆑 :opt's conversion function into the base classes that
...
actually need that conversion function. Silences a Clang++ warning.
llvm-svn: 86148
2009-11-05 18:30:50 +00:00
Dan Gohman
00c793822e
Add an assertion to catch indirectbr in SplitBlockPredecessors. This
...
makes several optimization passes abort in cases where they're currently
silently miscompiling code.
Remove the indirectbr assertion from SplitEdge. Indirectbr is only
a problem for critical edges, and SplitEdge defers to SplitCriticalEdge
to handle those, and SplitCriticalEdge has its own assertion for
indirectbr.
llvm-svn: 86147
2009-11-05 18:25:44 +00:00
Chris Lattner
06c26d982e
add a note from PR5313
...
llvm-svn: 86146
2009-11-05 18:19:19 +00:00
Chris Lattner
a117dd23e9
Declare classes with matched tags, pointed out by a clang++ warning.
...
llvm-svn: 86144
2009-11-05 17:51:44 +00:00
Benjamin Kramer
b971445ab7
Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
...
llvm-svn: 86141
2009-11-05 17:44:22 +00:00
Daniel Dunbar
1891a167a1
lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
...
arbitrary command line arguments to the test suite).
llvm-svn: 86137
2009-11-05 16:27:33 +00:00
Benjamin Kramer
3fcbb82151
Do map insert+find in one step. TODO -= 2.
...
llvm-svn: 86133
2009-11-05 14:33:27 +00:00
Benjamin Kramer
9470ecdb2c
Path::createDirectoryOnDisk should ignore existing directories on win32 too.
...
llvm-svn: 86132
2009-11-05 14:32:40 +00:00
Douglas Gregor
73818d685e
Make two more LLVM headers standalone
...
llvm-svn: 86131
2009-11-05 13:39:23 +00:00
Douglas Gregor
9ad44629c3
Make a few headers standalone. Plus, add a missing "template" keyword
...
that Clang diagnoses but GCC does not.
llvm-svn: 86130
2009-11-05 13:30:28 +00:00
Chris Lattner
046dff7acf
merge a few crash tests into crash.ll
...
llvm-svn: 86119
2009-11-05 05:57:34 +00:00
Mon P Wang
1a58236c2b
Reintroduce support for overloading target intrinsics
...
llvm-svn: 86114
2009-11-05 03:19:08 +00:00
David Goodwin
542649463b
Replace std::map.at() with std::map[].
...
llvm-svn: 86102
2009-11-05 01:45:50 +00:00
David Goodwin
7d8878add2
Break anti-dependencies using free registers in a round-robin manner to avoid introducing new anti-dependencies.
...
llvm-svn: 86098
2009-11-05 01:19:35 +00:00
Lang Hames
274be49480
Tidied some ugliness in the SlotIndex default constructor.
...
llvm-svn: 86097
2009-11-05 01:18:31 +00:00
Evan Cheng
66549b2818
Now that code placement optimization pass is run for JIT, make sure it's before pre-emit passes.
...
llvm-svn: 86092
2009-11-05 01:16:59 +00:00
Devang Patel
ba52f03052
Use WeakVH while storing metadata in containers.
...
This fixes PR5393.
llvm-svn: 86091
2009-11-05 01:13:02 +00:00
Lang Hames
a31fd78ff8
Removed an assert which was causing significant slowdowns in debug builds.
...
This assert was very conservative to begin with (the error condition is well
covered by tests elsewhere in the code) so we won't miss much by removing it.
llvm-svn: 86088
2009-11-05 00:52:28 +00:00
Bob Wilson
45119d8850
Add -mtriple to llc commands, attempting to fix buildbot failures.
...
llvm-svn: 86086
2009-11-05 00:51:31 +00:00
Evan Cheng
921152fe9d
Code refactoring.
...
llvm-svn: 86085
2009-11-05 00:51:13 +00:00
Bob Wilson
90d0b82e12
Attempt again to fix buildbot failures: make expected output less specific
...
and compile with -mtriple to specify *-apple-darwin targets.
llvm-svn: 86081
2009-11-05 00:30:35 +00:00
David Goodwin
28ba4f27d1
Correctly add chain dependencies around calls and unknown-side-effect instructions.
...
llvm-svn: 86080
2009-11-05 00:16:44 +00:00
Victor Hernandez
492ed30a32
Update CreateMalloc so that its callers specify the size to allocate:
...
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86077
2009-11-05 00:03:03 +00:00
Devang Patel
f05d57283e
While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
...
This improves bitfield support.
llvm-svn: 86073
2009-11-04 23:48:00 +00:00
Jim Grosbach
31569240c6
Grammar.
...
llvm-svn: 86068
2009-11-04 23:20:40 +00:00
Chris Lattner
a09062758b
improve DSE when TargetData is not around, based on work by
...
Hans Wennborg!
llvm-svn: 86067
2009-11-04 23:20:12 +00:00
Jim Grosbach
5833df9bde
Now that the memory leak from McCat/08-main has been fixed (86056), re-enable
...
aggressive testing of dynamic stack alignment.
Note that this is off by default, and enabled for LLCBETA nightly results.
llvm-svn: 86064
2009-11-04 23:11:07 +00:00
Jim Grosbach
2c7fd8f1db
If a function has no stack frame at all, dynamic realignment isn't necessary.
...
llvm-svn: 86057
2009-11-04 22:41:51 +00:00
Jim Grosbach
cc58cc1d56
dynamic stack realignment necessitates scanning the floating point callee-
...
saved instructions even if no stack adjustment for those saves is needed.
llvm-svn: 86056
2009-11-04 22:41:00 +00:00
Devang Patel
67f56f08c2
Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
...
llvm-svn: 86054
2009-11-04 22:06:12 +00:00
Bob Wilson
f84f7105f7
Add PowerPC codegen for indirect branches.
...
llvm-svn: 86050
2009-11-04 21:31:18 +00:00
Lang Hames
289b8a2bd9
Handle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when constructing index list entries.
...
llvm-svn: 86049
2009-11-04 21:24:15 +00:00
Duncan Sands
d732f396a2
A value is only assigned to errno if NumRead equals -1, so do
...
not reason based on errno if NumRead has a different value.
llvm-svn: 86046
2009-11-04 20:50:23 +00:00
Bob Wilson
e8ca96cf24
Fix broken test.
...
llvm-svn: 86045
2009-11-04 20:04:11 +00:00
Eric Christopher
9196f0c0e8
Add some options to disable various code gen optimizations.
...
llvm-svn: 86044
2009-11-04 19:57:50 +00:00
Devang Patel
5d3fe2fc77
Array element size does not match array size but array is not a bitfield.
...
llvm-svn: 86043
2009-11-04 19:37:40 +00:00
Bob Wilson
16f60b9216
Add test for ARM indirectbr codegen.
...
llvm-svn: 86042
2009-11-04 19:25:34 +00:00
Jakob Stoklund Olesen
c7cfc94bcc
Print out an informative comment for KILL instructions.
...
The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output.
With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF.
llvm-svn: 86041
2009-11-04 19:24:37 +00:00
Chris Lattner
762b56fa8c
Fix an iterator invalidation bug that happens when a hashtable
...
resizes in IPSCCP. This fixes PR5394.
llvm-svn: 86036
2009-11-04 18:57:42 +00:00
Evan Cheng
531045d554
Look for llvm-gcc under /Developer/usr/bin first.
...
llvm-svn: 86023
2009-11-04 08:36:50 +00:00
Evan Cheng
95bdc5d899
RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,
...
and extract_subreg as a "copy" that defines a valno.
Also fixes a typo. These two issues prevent a simple subreg coalescing from
happening before.
llvm-svn: 86022
2009-11-04 08:33:14 +00:00
Chris Lattner
cb3c64ee3c
move two functions up higher in the file. Delete a useless argument
...
to EmitGEPOffset.
Implement some new transforms for optimizing
subtracts of two pointer to ints into the same vector. This happens
for C++ iterator idioms for example, stringmap takes a const char*
that points to the start and end of a string. Once inlined, we want
the pointer difference to turn back into a length.
This is rdar://7362831.
llvm-svn: 86021
2009-11-04 08:05:20 +00:00
Chris Lattner
e3cdf2ed3b
filecheckize this test.
...
llvm-svn: 86020
2009-11-04 07:57:05 +00:00
Evan Cheng
c63943018f
The .n suffix must go after the predicate.
...
llvm-svn: 86019
2009-11-04 07:38:48 +00:00
Nick Lewycky
b8c923b1a6
The magic for our current brand of .bc files is BC. For older ones it was llvc.
...
When was it ever "llvm"?
llvm-svn: 86009
2009-11-04 06:15:28 +00:00
Chris Lattner
0fc4311f0e
make IRBuilder zap "X|0" and "X&-1" when building IR, this happens
...
during bitfield codegen and slows down -O0 compile times by making
useless IR. rdar://7362516
llvm-svn: 86006
2009-11-04 05:00:12 +00:00
Daniel Dunbar
b4a289c88e
configure: Add --with-optimize-option, for setting the default value of
...
OPTIMIZE_OPTION.
llvm-svn: 86005
2009-11-04 04:32:50 +00:00
Evan Cheng
2969877eea
Silence implicit conversion warnings.
...
llvm-svn: 86000
2009-11-04 03:08:57 +00:00
Lang Hames
88fa1e6c01
Another spurious friend declaration removed.
...
llvm-svn: 85997
2009-11-04 01:52:40 +00:00
Lang Hames
cd72c7b2b6
Removed an unnecessary friend declaration and some crufty comments from IndexListEntry.
...
llvm-svn: 85995
2009-11-04 01:34:22 +00:00
Douglas Gregor
90790c7781
Fix CMake makefiles
...
llvm-svn: 85994
2009-11-04 01:32:06 +00:00
Evan Cheng
8f4e3d99c9
Fix test.
...
llvm-svn: 85986
2009-11-04 00:42:33 +00:00
Evan Cheng
3f1a92468a
Use ldr.n to workaround a darwin assembler bug.
...
llvm-svn: 85980
2009-11-04 00:00:39 +00:00
Lang Hames
05fb9637f6
The Indexes Patch.
...
This introduces a new pass, SlotIndexes, which is responsible for numbering
instructions for register allocation (and other clients). SlotIndexes numbering
is designed to match the existing scheme, so this patch should not cause any
changes in the generated code.
For consistency, and to avoid naming confusion, LiveIndex has been renamed
SlotIndex.
The processImplicitDefs method of the LiveIntervals analysis has been moved
into its own pass so that it can be run prior to SlotIndexes. This was
necessary to match the existing numbering scheme.
llvm-svn: 85979
2009-11-03 23:52:08 +00:00
Bob Wilson
53a31ad3c1
Fix branch folding bug for indirect branches: for a block containing only
...
an unconditional branch (possibly from tail merging), this code is
trying to redirect all of its predecessors to go directly to the branch
target, but that isn't feasible for indirect branches. The other
predecessors (that don't end with indirect branches) could theoretically
still be handled, but that is not easily done right now.
The AnalyzeBranch interface doesn't currently let us distinguish jump table
branches from indirect branches, and this code is currently handling
jump tables. To avoid punting on address-taken blocks, we would have to give
up handling jump tables. That seems like a bad tradeoff.
llvm-svn: 85975
2009-11-03 23:44:31 +00:00
Chris Lattner
156b8c7109
reimplement multiple return value handling in IPSCCP, making it
...
more aggressive an correct. This survives building llvm in 64-bit
mode with optimizations and the built llvm passes make check.
llvm-svn: 85973
2009-11-03 23:40:48 +00:00
Evan Cheng
b376ce0169
Fix t2Int_eh_sjlj_setjmp. Immediate form of orr is a 32-bit instruction. So it should be 22 bytes instead of 20 bytes long.
...
llvm-svn: 85965
2009-11-03 23:13:34 +00:00
Bill Wendling
2c76d6dcea
Use llvm-gcc on newer Darwins.
...
llvm-svn: 85963
2009-11-03 22:50:10 +00:00
Evan Cheng
0410bced1c
fconsts / fconstd immediate should be proceeded with #.
...
llvm-svn: 85952
2009-11-03 21:59:33 +00:00
Chris Lattner
6e41c79763
fix broken link
...
llvm-svn: 85951
2009-11-03 21:50:09 +00:00
Evan Cheng
f42b5af549
Re-apply 85799. It turns out my code isn't buggy.
...
llvm-svn: 85947
2009-11-03 21:40:02 +00:00
Chris Lattner
9122fa2d1e
fix test
...
llvm-svn: 85946
2009-11-03 21:26:26 +00:00
Chris Lattner
69c523c813
merge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.
...
llvm-svn: 85945
2009-11-03 21:25:50 +00:00
David Goodwin
8501dbbe10
Do a scheduling pass ignoring anti-dependencies to identify candidate registers that should be renamed.
...
llvm-svn: 85939
2009-11-03 20:57:50 +00:00
Chris Lattner
2c427233d4
finish half thunk thought
...
llvm-svn: 85937
2009-11-03 20:52:57 +00:00
Victor Hernandez
3318858efd
Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), and avoid redundant isFreeCall cases) in feedback to r85176
...
llvm-svn: 85936
2009-11-03 20:39:35 +00:00
David Goodwin
a86f919763
<rdar://problem/7352605>. When building schedule graph use mayAlias information to avoid chaining loads/stores of spill slots with non-aliased memory ops.
...
llvm-svn: 85934
2009-11-03 20:15:00 +00:00
Victor Hernandez
5cd73a3470
Changes (* location in pointer variables, avoiding include, and using APInt::getLimitedValue) based on feedback to r85814
...
llvm-svn: 85933
2009-11-03 20:02:35 +00:00
Chris Lattner
d697debebf
turn IPSCCP back on by default, try #3 or 4? Woo.
...
llvm-svn: 85929
2009-11-03 19:35:13 +00:00
Chris Lattner
cde8de519d
fix an IPSCCP bug I introduced when I changed IPSCCP to start working on
...
functions that don't have local linkage. Basically, we need to be more
careful about propagating argument information to functions whose results
we aren't tracking. This fixes a miscompilation of
LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp
enabled.
llvm-svn: 85923
2009-11-03 19:24:51 +00:00
Duncan Sands
4afa0838d7
Make this code more robust by not thinking we are making progress
...
if zero bytes were read.
llvm-svn: 85922
2009-11-03 19:10:22 +00:00
Devang Patel
1cb5116292
Parse debug info attached with insertvalue and extractvalue instructions.
...
llvm-svn: 85921
2009-11-03 19:06:07 +00:00
Anton Korobeynikov
76a4774a0d
Move subtarget check upper for NEON reg-reg fixup pass.
...
llvm-svn: 85914
2009-11-03 18:46:11 +00:00
Chris Lattner
9e69536607
mark some constant global const.
...
llvm-svn: 85910
2009-11-03 18:30:31 +00:00
Devang Patel
ffa7c07352
Ignore unnamed variables.
...
llvm-svn: 85909
2009-11-03 18:30:27 +00:00
Chris Lattner
9840df0c40
xfail this test since daniel turned off ipsccp
...
llvm-svn: 85907
2009-11-03 17:54:12 +00:00
Chris Lattner
6ec614e15e
testcase for r85903
...
llvm-svn: 85906
2009-11-03 17:03:02 +00:00
Chris Lattner
e1d5cd9f48
fix a subtle bug I introduced when refactoring SCCP. Testcase
...
to follow.
llvm-svn: 85903
2009-11-03 16:50:11 +00:00
Kenneth Uildriks
90fedc6ef9
Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
...
llvm-svn: 85900
2009-11-03 15:29:06 +00:00
Kenneth Uildriks
26393d8792
Added a comment to a function that had none
...
llvm-svn: 85899
2009-11-03 15:25:20 +00:00
Benjamin Kramer
5573971453
Eliminate some temporaries.
...
llvm-svn: 85896
2009-11-03 12:52:50 +00:00
Duncan Sands
2e59fc5c5a
Run the functionattrs pass after the inliner, and not before.
...
This makes both logical sense (see below) and increases the
number of functions marked readnone/readonly by about 1-2%
in practice. The number of functions marked nocapture goes
up by about 5-10%. The reason it makes sense is shown by
the following example: if you run -functionattrs -inline on
it, then no attributes are assigned. But if you instead run
-inline -functionattrs then @f is marked readnone because the
simplifications produced by the inliner eliminate the store.
@x = external global i32
define void @w(i1 %b) {
br i1 %b, label %write, label %return
write:
store i32 1, i32 *@x
br label %return
return:
ret void
}
define void @f() {
call void @w(i1 0)
ret void
}
llvm-svn: 85893
2009-11-03 09:40:08 +00:00
Daniel Dunbar
7e4a9e18c4
Speculatively redisable IPSCCP, I think its still breaking things.
...
llvm-svn: 85884
2009-11-03 07:49:22 +00:00
Daniel Dunbar
12454b8e0f
lit: Update Clang's test style to use XFAIL: and XTARGET: lines that match
...
LLVM's tests.
llvm-svn: 85882
2009-11-03 07:26:38 +00:00
Evan Cheng
31c2f4701b
Trim unnecessary include.
...
llvm-svn: 85878
2009-11-03 07:08:08 +00:00
Bob Wilson
064c5fef11
For Thumb indirect branches, use "mov pc, reg" which does not switch
...
between ARM/Thumb modes and does not require the low bit of the target
address to be set for Thumb.
llvm-svn: 85874
2009-11-03 06:29:56 +00:00
Jeffrey Yasskin
6235b19d7b
Fix a funky "declared with greater visibility than the type of its field"
...
warning from gcc by removing VISIBILITY_HIDDEN attributes.
llvm-svn: 85873
2009-11-03 06:29:36 +00:00
Evan Cheng
8d681f0471
Fix PR5367. QPR_8 is the super regclass of DPR_8 and SPR_8.
...
llvm-svn: 85871
2009-11-03 05:52:54 +00:00
Evan Cheng
23c009f125
Clean up copyRegToReg.
...
llvm-svn: 85870
2009-11-03 05:51:39 +00:00
Evan Cheng
9e9079371c
Add QPR_8 as a superreg class of SPR_8 and DPR_8.
...
llvm-svn: 85869
2009-11-03 05:50:57 +00:00
Chris Lattner
03d1bca60a
remove unneeded checks of isFreeCall
...
llvm-svn: 85866
2009-11-03 05:35:19 +00:00
Chris Lattner
e9dccd4934
remove a check of isFreeCall: the argument to free is already nocapture so the generic call code works fine.
...
llvm-svn: 85865
2009-11-03 05:34:51 +00:00
Chris Lattner
5a3832496a
remove a isFreeCall check: it is a callinst that can write to memory already.
...
llvm-svn: 85863
2009-11-03 05:33:46 +00:00
Ted Kremenek
187cb4f493
Update CMake file.
...
llvm-svn: 85861
2009-11-03 04:14:12 +00:00
Ted Kremenek
a6484f4208
Support updating 'llvm_add_target' lists as well.
...
llvm-svn: 85860
2009-11-03 04:06:58 +00:00
Ted Kremenek
2124f0d43f
Alphabetize.
...
llvm-svn: 85859
2009-11-03 04:01:53 +00:00
Chris Lattner
fb14181b18
turn IPSCCP back on now that the iterator invalidation bug is fixed.
...
llvm-svn: 85858
2009-11-03 03:42:51 +00:00
Nate Begeman
26bb8a730d
Add a couple more target nodes
...
llvm-svn: 85857
2009-11-03 03:30:51 +00:00
Nate Begeman
a21bc75d78
Declare sin & cos as readonly so they match the code in SelectionDAGBuild
...
llvm-svn: 85853
2009-11-03 02:19:31 +00:00
Anton Korobeynikov
d195f9e5c3
Turn neon reg-reg moves fixup code into separate pass. This should reduce the compile time.
...
llvm-svn: 85850
2009-11-03 01:04:26 +00:00
Anton Korobeynikov
2c2dc9f64f
Temporary xfail until PR5367 will be resolved
...
llvm-svn: 85848
2009-11-03 00:37:36 +00:00
Anton Korobeynikov
fbe0256b23
Revert r85049, it is causing PR5367
...
llvm-svn: 85847
2009-11-03 00:24:48 +00:00
Bob Wilson
b389f2a04d
Revert previous change to a comment. The BlockAddresses go in the
...
constant pool so they don't get wrapped separately.
llvm-svn: 85844
2009-11-03 00:02:05 +00:00
Chris Lattner
b70ef3c8c7
fix a nasty iterator invalidation bug from my conversion from
...
std::map to DenseMap, exposed on release llvm-gcc bootstrap.
llvm-svn: 85840
2009-11-02 23:25:39 +00:00
Evan Cheng
a8a58efc03
Revert 85799 for now. It might be breaking llvm-gcc driver.
...
llvm-svn: 85827
2009-11-02 21:49:14 +00:00
Bob Wilson
1c66e8a6b7
Put BlockAddresses into ARM constant pools.
...
llvm-svn: 85824
2009-11-02 20:59:23 +00:00
Kevin Enderby
d9dfc2e752
Fix ARMAsmParser::ParseMemoryOffsetReg() where the parameter OffsetRegNum should
...
have been passed as a reference.
llvm-svn: 85823
2009-11-02 20:14:39 +00:00
Chris Lattner
a15cc59dcb
revert r8579[56], which are causing unhappiness in buildbot land.
...
llvm-svn: 85818
2009-11-02 19:31:10 +00:00
Oscar Fuentes
c710219d1c
CMake: Report an error if there is an unknown .cpp file in a source
...
directory.
This is useful in case someone who works with the config&make build
system forgot to add a file to its CMakeLists.txt. Instead of
obtaining undefined references at link time, cmake will complain at
configure time on the first build after a svn update.
llvm-svn: 85817
2009-11-02 19:11:03 +00:00
Victor Hernandez
df022f1449
Set bit instead of calling pow() to compute 2 << n
...
llvm-svn: 85814
2009-11-02 18:51:28 +00:00
Chris Lattner
a38a4dfea7
typo
...
llvm-svn: 85812
2009-11-02 18:28:45 +00:00
Chris Lattner
e364a32a65
merge 2008-03-10-sret.ll into ipsccp-basic.ll, and upgrade its syntax.
...
llvm-svn: 85811
2009-11-02 18:27:22 +00:00
Chris Lattner
a3d794ebbb
disable IPSCCP support for multiple return values, it is buggy, so just
...
disable it until I can fix it.
llvm-svn: 85810
2009-11-02 18:22:51 +00:00
David Goodwin
5ac6f244fd
Fix schedule model for BFC.
...
llvm-svn: 85809
2009-11-02 17:28:36 +00:00
Bob Wilson
4c00a524eb
Hyphenate some comments.
...
llvm-svn: 85808
2009-11-02 17:10:37 +00:00
David Goodwin
00822aabf6
Chain dependencies used to enforce memory order should have latency of 0 (except for true dependency of Store followed by aliased Load... we estimate that case with a single cycle of latency assuming the hardware will bypass)
...
llvm-svn: 85807
2009-11-02 17:06:28 +00:00
Bob Wilson
433ab09ca3
Add support for BlockAddress values in ARM constant pools.
...
llvm-svn: 85806
2009-11-02 16:59:06 +00:00
Bob Wilson
e90a4aa703
Prune unnecessary include.
...
llvm-svn: 85805
2009-11-02 16:58:31 +00:00
Evan Cheng
2729543984
Initilize the machine LICM CSE map upon the first time an instruction is hoisted to
...
the loop preheader. Add instructions which are already in the preheader block that
may be common expressions of those that are hoisted out. These does get a few more
instructions CSE'ed.
llvm-svn: 85799
2009-11-02 08:09:49 +00:00
Evan Cheng
115cfc07d5
These are done / no longer care.
...
llvm-svn: 85798
2009-11-02 07:58:25 +00:00
Evan Cheng
f6f1b37f9f
Add an entry.
...
llvm-svn: 85797
2009-11-02 07:51:19 +00:00
Chris Lattner
879e05ab1f
now that ip sccp *really* subsumes ipcp, remove ipcp again.
...
llvm-svn: 85796
2009-11-02 07:34:29 +00:00
Chris Lattner
9d49f0c858
improve IPSCCP to be able to propagate the result of "!mayBeOverridden"
...
function to calls of that function, regardless of whether it has local
linkage or has its address taken. Not escaping should only affect
whether we make an aggressive assumption about the arguments to a
function, not whether we can track the result of it.
llvm-svn: 85795
2009-11-02 07:33:59 +00:00
Evan Cheng
fb2d385221
Remove an irrelevant and poorly reduced test case.
...
llvm-svn: 85794
2009-11-02 07:11:54 +00:00
Chris Lattner
47837c5182
don't mark the arguments of prototype overdefined, they will never be queried.
...
llvm-svn: 85793
2009-11-02 06:34:04 +00:00
Chris Lattner
5503328332
restore some code I removed in r85788, refactor it into
...
a shared place instead of duplicating it 4 times.
llvm-svn: 85792
2009-11-02 06:28:16 +00:00
Chris Lattner
4910b656b2
remove some confused code that dates from when we had
...
"multiple return values" but not "first class aggregates"
llvm-svn: 85791
2009-11-02 06:17:06 +00:00
Chris Lattner
809aee2f40
avoid redundant lookups in BBExecutable, and make it a SmallPtrSet.
...
llvm-svn: 85790
2009-11-02 06:11:23 +00:00
Chris Lattner
e77c9aa04a
Use the libanalysis 'ConstantFoldLoadFromConstPtr' function
...
instead of reinventing SCCP-specific logic. This gives us
new powers.
llvm-svn: 85789
2009-11-02 06:06:14 +00:00
Chris Lattner
f548403989
switch the main 'ValueState' map from being an std::map to being
...
a DenseMap. Doing this required being aware of subtle iterator
invalidation issues, but it provides a big speedup. In a
release-asserts build, this sped up optimizing 403.gcc from
1.34s -> 0.79s (IPSCCP) and 1.11s -> 0.44s (SCCP).
This commit also conflates in a bunch of general cleanups, sorry.
llvm-svn: 85788
2009-11-02 05:55:40 +00:00
Evan Cheng
1708b06c0e
Unbreak ARMBaseRegisterInfo::copyRegToReg.
...
llvm-svn: 85787
2009-11-02 04:44:55 +00:00
Chris Lattner
4e849162ef
fix a bug exposed by moving SRoA earlier which caused a crash building kc++
...
llvm-svn: 85786
2009-11-02 04:37:17 +00:00
Jim Grosbach
923cf49e6d
Missing bit of universal built + hosted
...
llvm-svn: 85785
2009-11-02 03:46:35 +00:00
Chris Lattner
e82b087ae6
only IPSCCP incoming arguments if the function is executable, this fixes
...
an assertion on the buildbot.
llvm-svn: 85784
2009-11-02 03:25:55 +00:00
Chris Lattner
9e97fbe114
add a new ValueState::getConstantInt() helper, use it to
...
simplify some code.
llvm-svn: 85783
2009-11-02 03:21:36 +00:00
Edward O'Callaghan
2c7457c0f1
Fix malloc.h is deprecated warning on DragonFly BSD.
...
llvm-svn: 85782
2009-11-02 03:20:57 +00:00
Edward O'Callaghan
0cc7777ce8
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()
...
llvm-svn: 85781
2009-11-02 03:14:31 +00:00
Chris Lattner
7ccf1a6df6
tidy up some more: remove some extraneous inline specifiers, return harder.
...
llvm-svn: 85780
2009-11-02 03:03:42 +00:00
Edward O'Callaghan
78eedecade
Apply fix for PR5135, Credit to Andreas Neustifter.
...
llvm-svn: 85779
2009-11-02 02:55:39 +00:00
Chris Lattner
b5a13d4c90
eliminate the SCCPSolver::getValueMapping method.
...
llvm-svn: 85778
2009-11-02 02:54:24 +00:00
Chris Lattner
c49ae9912a
fix failures introduced in r85774
...
llvm-svn: 85777
2009-11-02 02:48:17 +00:00
Chris Lattner
e405ed9651
factor duplicated code into a new DeleteInstructionInBlock
...
function, eliminate temporary (and pointless) smallvector.
llvm-svn: 85776
2009-11-02 02:47:51 +00:00
Chris Lattner
a3c39d394d
Chris used to use '...' instead of proper grammar.
...
llvm-svn: 85775
2009-11-02 02:33:50 +00:00
Chris Lattner
6df5cec72f
remove some extraneous llvmcontext stuff.
...
llvm-svn: 85774
2009-11-02 02:30:06 +00:00
Chris Lattner
efdd2bbce6
change LatticeVal to use PointerIntPair to save some space.
...
llvm-svn: 85773
2009-11-02 02:20:32 +00:00
Chris Lattner
3cd6a61b27
fix instcombine to only do store sinking when the alignments
...
of the two loads agree. Propagate that onto the new store.
llvm-svn: 85772
2009-11-02 02:06:37 +00:00
Chris Lattner
db3311edc7
merge a test into store.ll
...
llvm-svn: 85771
2009-11-02 02:00:18 +00:00
Chris Lattner
d263dbec7a
convert to filecheck
...
llvm-svn: 85770
2009-11-02 01:58:03 +00:00
Bill Wendling
33fef7e4e5
Add missing end-tag.
...
llvm-svn: 85769
2009-11-02 00:25:26 +00:00
Bill Wendling
7f4a336785
Some formatting changes.
...
llvm-svn: 85768
2009-11-02 00:24:16 +00:00
Anton Korobeynikov
4d23754b14
Handle splats of undefs properly. This includes the testcase for PR5364 as well.
...
llvm-svn: 85767
2009-11-02 00:12:06 +00:00
Anton Korobeynikov
0f38d989bd
Do not infer the target type for COPY_TO_REGCLASS from dest regclass, this won't work if it can contain several types. Require explicit result type for the node for now. This fixes PR5364.
...
PS: It seems that blackfin usage of copy_to_regclass is completely bogus!
llvm-svn: 85766
2009-11-02 00:11:39 +00:00
Anton Korobeynikov
8cce1eb6aa
64-bit FP loads & stores operate on both NEON and VFP pipelines.
...
llvm-svn: 85765
2009-11-02 00:11:06 +00:00
Anton Korobeynikov
14635da94b
Use NEON reg-reg moves, where profitable. This reduces "domain-cross" stalls, when we used to mix vfp and neon code (the former were used for reg-reg moves)
...
llvm-svn: 85764
2009-11-02 00:10:38 +00:00
Evan Cheng
ea68c7c9a8
Add PseudoSourceValue::mayAlias. It returns true if the object can ever alias any LLVM IR value.
...
llvm-svn: 85762
2009-11-01 23:50:04 +00:00
Nick Lewycky
e0856c5f40
Line this up as well.
...
llvm-svn: 85748
2009-11-01 22:08:51 +00:00
Nick Lewycky
b244909ad4
Fix whitespace.
...
llvm-svn: 85747
2009-11-01 22:07:54 +00:00
Evan Cheng
1a4492be97
Fix a couple more places where we are creating ld / st instructions without memoperands.
...
llvm-svn: 85746
2009-11-01 22:04:35 +00:00
Evan Cheng
43219997b6
Make use of imm12 version of Thumb2 ldr / str instructions more aggressively.
...
llvm-svn: 85743
2009-11-01 21:12:51 +00:00
Chris Lattner
ef94654363
fix two strange things in the default passmgr:
...
1. we'd run simplifycfg at the very start, even though
the per function passes have already cleaned this up.
2. In the main per-function pipeline that is interlaced with inlining
etc, we would do instcombine, jump threading, simplifycfg *before*
doing SROA. SROA is much more likely to expose opportunities for
these passes than they are for SROA, so move SRoA up earlier.
also add some comments.
llvm-svn: 85742
2009-11-01 20:41:59 +00:00
Chris Lattner
3e6398baa5
merge phi-merge.ll into phi.ll
...
I don't know what Dan wants to do with phi-merge-gep.ll, I'll let
him deal with it because instcombine may end up sinking these.
llvm-svn: 85739
2009-11-01 20:10:11 +00:00
Chris Lattner
328ef89bd1
when merging two loads, make sure to take the min of their alignment,
...
not the max. This didn't matter until the previous patch because
instcombine would refuse to sink loads with differenting alignments.
llvm-svn: 85738
2009-11-01 20:07:07 +00:00
Chris Lattner
2a249e267a
split load sinking out to its own function, like gep sinking.
...
llvm-svn: 85737
2009-11-01 20:04:24 +00:00
Chris Lattner
0b40a8bc0e
fix a bug noticed by inspection: when instcombine sinks loads through
...
phis, it didn't preserve the alignment of the load. This is a missed
optimization of the alignment is high and a miscompilation when the
alignment is low.
llvm-svn: 85736
2009-11-01 19:50:13 +00:00
Chris Lattner
2805f116f6
IPSCCP apparently is not a superset of IPCP, this is bad,
...
but I'll investigate it separately. This unbreaks
test/FrontendC/weak_constant.c
llvm-svn: 85735
2009-11-01 19:29:12 +00:00
Chris Lattner
d162b5c955
convert to filecheck.
...
llvm-svn: 85734
2009-11-01 19:22:20 +00:00