Dan Gohman
6571ef3577
Don't use special heuristics for nodes with no data predecessors
...
unless they actually have data successors, and likewise for nodes
with no data successors unless they actually have data precessors.
llvm-svn: 64327
2009-02-11 21:29:39 +00:00
Ted Kremenek
88ceac46de
Add FoldingSet profile method for bools. Patch by Ben Laurie!
...
llvm-svn: 64324
2009-02-11 20:53:17 +00:00
Daniel Dunbar
df8bc9fc7b
Update to match space changes in .ll
...
llvm-svn: 64322
2009-02-11 20:48:21 +00:00
Dan Gohman
298a2946f1
Delete the heuristic for non-livein CopyFromReg nodes. Non-liveinness
...
is determined by whether the node has a Flag operand. However, if the
node does have a Flag operand, it will be glued to its register's
def, so the heuristic would end up spuriously applying to whatever
node is the def.
llvm-svn: 64319
2009-02-11 20:25:59 +00:00
Dan Gohman
27f85854f9
Don't try to set an EFLAGS operand to dead if no instruction was created.
...
This fixes a bug introduced by r61215.
llvm-svn: 64316
2009-02-11 19:50:24 +00:00
Dale Johannesen
cc5fc44d02
Make a transformation added in 63266 a bit less aggressive.
...
It was transforming (x&y)==y to (x&y)!=0 in the case where
y is variable and known to have at most one bit set (e.g. z&1).
This is not correct; the expressions are not equivalent when y==0.
I believe this patch salvages what can be salvaged, including
all the cases in bt.ll. Dan, please review.
Fixes gcc.c-torture/execute/20040709-[12].c
llvm-svn: 64314
2009-02-11 19:19:41 +00:00
Bill Wendling
5f14a01340
Revert r64300 and r64301. These were causing the following errors respectively:
...
During llvm-gcc bootstrap:
Undefined symbols:
"llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
"llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1
During an LLVM release build:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans
llvm-svn: 64311
2009-02-11 18:19:24 +00:00
Duncan Sands
185fc29820
Revert r64299: it breaks the build when configured
...
without --enable-pic, like my nightly tester.
llvm-svn: 64302
2009-02-11 13:23:49 +00:00
Duncan Sands
5b3349064d
These uses of "inline" can cause strange link-time
...
failures when building with optimization. Just get
rid of them.
llvm-svn: 64301
2009-02-11 12:25:15 +00:00
Duncan Sands
003754f656
Make sure the SCC pass manager initializes any contained
...
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64300
2009-02-11 09:58:43 +00:00
Nick Lewycky
9dfffc6c9f
Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.
...
llvm-svn: 64299
2009-02-11 08:44:13 +00:00
Evan Cheng
a1968b0fc7
Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies.
...
llvm-svn: 64298
2009-02-11 08:24:21 +00:00
Dan Gohman
dfaf646c34
When scheduling a block in parts, keep track of the overall
...
instruction index across each part. Instruction indices are used
to make live range queries, and live ranges can extend beyond
scheduling region boundaries.
Refactor the ScheduleDAGSDNodes class some more so that it
doesn't have to worry about this additional information.
llvm-svn: 64288
2009-02-11 04:27:20 +00:00
Devang Patel
8a9ced15d4
62987 disables LTO build on darwin.
...
Revert 62987 for now. Nicolas please investigate.
llvm-svn: 64285
2009-02-11 02:34:33 +00:00
Devang Patel
316705027b
If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.
...
llvm-svn: 64278
2009-02-11 01:29:06 +00:00
Dan Gohman
1262a25683
Don't print extra spaces in vector and array constants. This makes
...
them visually more consistent with vector and array types.
llvm-svn: 64267
2009-02-11 00:25:25 +00:00
Dan Gohman
c8dcf4d72b
It isn't necessary to explicitly clear the contents of std::vector
...
and DenseMap members in a destructor. And tidy up a comment.
llvm-svn: 64265
2009-02-11 00:18:15 +00:00
Bill Wendling
e5640dd8ad
Don't try to strip a file we just moved.
...
llvm-svn: 64263
2009-02-11 00:14:53 +00:00
Dan Gohman
27fa408b64
Use iterators to iterate through the Preds array instead of
...
an index. This code is on the hot-path because the current
way SDep edges are uniqued has quadratic complexity.
llvm-svn: 64262
2009-02-11 00:12:28 +00:00
Dan Gohman
b3dbb21df1
Consider any instruction that modifies the stack pointer to be
...
a scheduling region boundary. This isn't necessary for
correctness; it helps with compile time, as it avoids the need
for data- and anti-dependencies from all spills and reloads on
the stack-pointer modification.
llvm-svn: 64255
2009-02-10 23:29:38 +00:00
Dan Gohman
b95434356c
Factor out more code for computing register live-range informationfor
...
scheduling, and generalize is so that preserves state across
scheduling regions. This fixes incorrect live-range information around
terminators and labels, which are effective region boundaries.
In place of looking for terminators to anchor inter-block dependencies,
introduce special entry and exit scheduling units for this purpose.
llvm-svn: 64254
2009-02-10 23:27:53 +00:00
Devang Patel
654e47f366
Ignore dbg intrinsic while folding unconditional branch.
...
llvm-svn: 64242
2009-02-10 22:14:17 +00:00
Evan Cheng
589a539423
Handle llvm.x86.sse2.maskmov.dqu in 64-bit.
...
llvm-svn: 64240
2009-02-10 22:06:28 +00:00
Evan Cheng
df15f13c34
80 col violations.
...
llvm-svn: 64237
2009-02-10 21:39:44 +00:00
Duncan Sands
6632f12c11
This is now done using a real i33, rather than
...
an emulated one. Adjust the check.
llvm-svn: 64236
2009-02-10 20:44:15 +00:00
Devang Patel
da1a632a87
Use early exits. Reduce indentation.
...
llvm-svn: 64226
2009-02-10 19:28:07 +00:00
Dan Gohman
1f517dd1c4
Use const, to support platforms where strrchr returns a const char *.
...
This fixes PR3535.
llvm-svn: 64224
2009-02-10 17:56:28 +00:00
Dan Gohman
1093e9a021
Answer a common FAQ:
...
"Can I compile C or C++ code to platform-independent LLVM bitcode?"
llvm-svn: 64222
2009-02-10 17:26:53 +00:00
Duncan Sands
d1de45a146
Pacify gcc-4.3 (thinks IsConstant may be used
...
uninitialized).
llvm-svn: 64220
2009-02-10 16:24:55 +00:00
Evan Cheng
ce3bbe515b
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
...
llvm-svn: 64210
2009-02-10 08:30:11 +00:00
Devang Patel
4bed3565f3
Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.
...
llvm-svn: 64209
2009-02-10 07:48:18 +00:00
Devang Patel
caf4485781
Enable scalar replacement of AllocaInst whose one of the user is dbg info.
...
llvm-svn: 64207
2009-02-10 07:00:59 +00:00
Devang Patel
9b6c1d6313
Validate file id.
...
llvm-svn: 64204
2009-02-10 06:04:08 +00:00
Sanjiv Gupta
c3f7b82628
Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
...
llvm-svn: 64199
2009-02-10 04:20:26 +00:00
Evan Cheng
e5ade4a9a1
Implement FpSET_ST1_*.
...
llvm-svn: 64186
2009-02-09 23:32:07 +00:00
Evan Cheng
3af42a8a14
If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
...
llvm-svn: 64184
2009-02-09 22:47:36 +00:00
Dale Johannesen
cd19967754
Fix PR 3471, and some cleanups.
...
llvm-svn: 64177
2009-02-09 22:14:15 +00:00
Evan Cheng
fe174df170
Simplify code.
...
llvm-svn: 64164
2009-02-09 21:01:06 +00:00
Evan Cheng
020588cee3
Make sure constant subscript is truncated to ptr size if it may not fit.
...
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Gabor Greif
5b9974a81f
incorporate review feedback
...
llvm-svn: 64158
2009-02-09 20:27:45 +00:00
Dan Gohman
a950e99dee
Use doxygen comment syntax.
...
llvm-svn: 64150
2009-02-09 18:12:09 +00:00
Dan Gohman
9280a685db
Use slightly more correct grammar in error messages.
...
llvm-svn: 64148
2009-02-09 17:41:21 +00:00
Mikhail Glushenkov
8ebeee37dc
80-column violations.
...
llvm-svn: 64147
2009-02-09 17:11:05 +00:00
Gabor Greif
cab008f51f
make sure that BranchInst::getSuccessor() does not assert in cast<>
...
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.
llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Bill Wendling
b9ad4921fd
Fix comment.
...
llvm-svn: 64137
2009-02-09 12:31:40 +00:00
Bill Wendling
cdd2f21dea
These function return 'void'. Don't have 'return' return anything.
...
llvm-svn: 64136
2009-02-09 12:31:26 +00:00
Chris Lattner
bf1d5458ad
fix typo, patch by Jonathan Brandmeyer!
...
llvm-svn: 64132
2009-02-09 10:00:56 +00:00
Duncan Sands
8c469be54b
Testcase for PR2437.
...
llvm-svn: 64131
2009-02-09 09:41:49 +00:00
Evan Cheng
f736bd9c79
Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
...
llvm-svn: 64126
2009-02-09 08:45:39 +00:00
Evan Cheng
81ae066ab6
Fix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case possible since I don't know what to grep for. :-(
...
llvm-svn: 64125
2009-02-09 08:37:45 +00:00