Bill Wendling [Fri, 19 Dec 2008 22:25:01 +0000 (22:25 +0000)]
Un-XFAIL this test because it's passing and John doesn't seem interested in un-XFAILing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61264
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 22:23:43 +0000 (22:23 +0000)]
Use ~0u instead of -1u as the special value, to hopefully avoid
warnings on compilers that warn about such things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61263
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 19 Dec 2008 20:58:01 +0000 (20:58 +0000)]
Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
172 %ECX<def> = MOV32rr %reg1039<kill>
180 INLINEASM <es:subl $5,$1
sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188 %EAX<def> = MOV32rr %EAX<kill>
196 %ECX<def> = MOV32rr %ECX<kill>
204 %ECX<def> = MOV32rr %ECX<kill>
212 %EAX<def> = MOV32rr %EAX<kill>
220 %EAX<def> = MOV32rr %EAX
228 %reg1039<def> = MOV32rr %ECX<kill>
The early clobber operand ties ECX input to the ECX def.
The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0) 0@174-(230) 1@46-(47)
The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0) 0@174-(182) 1@181-230 @2@46-(47)
Of course that won't work since that means overlapping live ranges defined by two val#.
The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61259
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Fri, 19 Dec 2008 19:56:36 +0000 (19:56 +0000)]
The fields for the stoppoint debug intrinsic have not changed, so update the
version number assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61257
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 19 Dec 2008 19:08:13 +0000 (19:08 +0000)]
This test works again for Darwin because a patch was reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61254
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 19 Dec 2008 18:51:17 +0000 (18:51 +0000)]
Add dyn_cast_or_null bindings for some additional classes missed in r61252.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61253
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 19 Dec 2008 18:39:45 +0000 (18:39 +0000)]
C bindings for dyn_cast_or_null.
This operation can be used to build dyn_cast, isa, and cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 19 Dec 2008 18:37:59 +0000 (18:37 +0000)]
Add support for writing LLVM IR to a specified BitstreamWriter.
Patch by Lukasz Janyst!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61251
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 18:25:21 +0000 (18:25 +0000)]
Move the patterns which have i8 immediates before the patterns
that have i32 immediates so that they get selected first. This
currently only matters in the JIT, as assemblers will
automatically use the smallest encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61250
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 18:13:39 +0000 (18:13 +0000)]
Use dyn_cast intead of isa + cast in the generated DAGISel code. This
reduces the amount of code slightly when assertions are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61249
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 19 Dec 2008 18:03:11 +0000 (18:03 +0000)]
- CodeGenPrepare does not split loop back edges but it only knows about back edges of single block loops. It now does a DFS walk to find loop back edges.
- Use SplitBlockPredecessors to factor out common predecessors of the critical edge destination. This is disabled for now due to some regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 19 Dec 2008 17:03:38 +0000 (17:03 +0000)]
Fix some release-assert warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61244
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Dec 2008 10:55:56 +0000 (10:55 +0000)]
Fix bug 3202.
The EH_frame and .eh symbols are now private, except for darwin9 and earlier.
The patch also fixes the definition of PrivateGlobalPrefix on pcc linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61242
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 19 Dec 2008 09:41:54 +0000 (09:41 +0000)]
Update the .cvs files for nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61241
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 19 Dec 2008 09:38:31 +0000 (09:38 +0000)]
Commit missed files from nocapture change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 19 Dec 2008 06:39:12 +0000 (06:39 +0000)]
Resubmit support for the 'nocapture' attribute.
The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.
This change will require users to rebuild llvm-gcc to match llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61239
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 19 Dec 2008 02:09:57 +0000 (02:09 +0000)]
Perform this loop only when the -debug flag is specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61238
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 00:46:20 +0000 (00:46 +0000)]
Initialize the ImplicitDefed member, to avoid getting stale
data from a previous block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61237
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 00:45:13 +0000 (00:45 +0000)]
Fix RegScavenger::forward() to work on basic blocks containing exactly
one instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61236
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 19 Dec 2008 00:34:32 +0000 (00:34 +0000)]
Delete the RegScavenging constructor that takes a MachineBasicBlock
argument. Nothing was using it, and it set the MBB member without
calling enterBasicBlock, which was problematic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61234
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 18 Dec 2008 23:42:37 +0000 (23:42 +0000)]
Fix test to account for generating some vector code for mul v2i64 instead
of incorrectly generating pmuldq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61228
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Dec 2008 22:19:50 +0000 (22:19 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61222
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:14:08 +0000 (22:14 +0000)]
Teach LowerSubregs to preserve kill/dead information when lowering
subreg instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61220
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Dec 2008 22:13:31 +0000 (22:13 +0000)]
Re-XFAIL this test until debug stuff settles down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61219
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:11:34 +0000 (22:11 +0000)]
Make LowerSubregs' debug output for EXTRACT_SUBREG consistent with
that of INSERT_SUBREG and SUBREG_TO_REG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61218
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:07:25 +0000 (22:07 +0000)]
Fix a copy+pasto in an assertion message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61217
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:06:01 +0000 (22:06 +0000)]
Fix indentation level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61216
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:03:42 +0000 (22:03 +0000)]
When emitting instructions that define EFLAGS and the EFLAGS value isn't
used, mark the defs as dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61215
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 22:01:52 +0000 (22:01 +0000)]
When setting up the frame pointer, add it as a live-in register to all
non-entry blocks, so that it doesn't appear use-before-def anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61214
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 21:51:27 +0000 (21:51 +0000)]
Print subreg information in MachineInstr::dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61213
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 18 Dec 2008 21:42:19 +0000 (21:42 +0000)]
Fixed x86 code generation of multiple for v2i64. It was incorrect for SSE4.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61211
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 18 Dec 2008 20:05:58 +0000 (20:05 +0000)]
Added some basic test cases for r61209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61210
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 18 Dec 2008 20:03:17 +0000 (20:03 +0000)]
Added support for vector widening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61209
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 18 Dec 2008 09:01:18 +0000 (09:01 +0000)]
Remove dead comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61201
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 18 Dec 2008 06:42:28 +0000 (06:42 +0000)]
Oops! Left out a line.
Simplifying the sdiv might allow further simplifications for our users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61196
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 18 Dec 2008 06:31:11 +0000 (06:31 +0000)]
Make all the vector elements positive in an srem of constant vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61195
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Dec 2008 05:52:56 +0000 (05:52 +0000)]
Fix PR2929 by making bugpoint/code extract propagate the nothrow
bit from the original function to the cloned one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61194
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 18 Dec 2008 04:06:58 +0000 (04:06 +0000)]
Fix typo in error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61191
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 18 Dec 2008 02:15:05 +0000 (02:15 +0000)]
Recommit this grammar fix that was backed out along with nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61189
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 01:37:56 +0000 (01:37 +0000)]
Give MachineLICM a name, for -time-passes etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61184
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 01:36:42 +0000 (01:36 +0000)]
Move post-RA scheduling before branch folding for now, because branch
folding's tail merging doesn't currently preserve liveness information
which post-RA scheduling requires.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61183
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 18 Dec 2008 01:27:19 +0000 (01:27 +0000)]
Re-apply r61158 in a form that no longer breaks tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61182
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 18 Dec 2008 01:23:41 +0000 (01:23 +0000)]
Revert previous patch, appears to break bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61181
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Dec 2008 01:05:09 +0000 (01:05 +0000)]
Mark the x86 fp stack registers as "reserved". This tells LiveVariables
and the RegisterScavenger not to expect traditional liveness
techniques are applicable to these registers, since we don't fully
modify the effects of push and pop after stackification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61179
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 18 Dec 2008 00:57:22 +0000 (00:57 +0000)]
Fix the time regression I introduced in 464.h264ref with
my last patch to this file.
The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop. This was extra bad
because register pressure later forced both base and IV into
memory. Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this. However,
there were side effects....
It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before. (This patch does not handle
all the cases where this can happen.) And when inserting
new code that feeds into a PHI, it's right to put such
code at the original location rather than in the PHI's
immediate predecessor(s) when the original location is outside
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.
Everything above is exercised in
CodeGen/X86/lsr-negative-stride.ll (and ifcvt4 in ARM which is
the same IR).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61178
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Dec 2008 00:51:32 +0000 (00:51 +0000)]
reapply this hunk from Bill's reversion in r61169, it is conservative
and safe and orthogonal from turning off load pre.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61177
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Dec 2008 00:35:21 +0000 (00:35 +0000)]
XFAIL on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61176
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Dec 2008 00:33:11 +0000 (00:33 +0000)]
make instnamer name unnamed blocks as well as instructions and args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61175
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Dec 2008 00:27:15 +0000 (00:27 +0000)]
Do not XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61174
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Dec 2008 23:31:20 +0000 (23:31 +0000)]
Temporarily revert r61027. It was causing a bootstrap failure in "release" mode
with everyone's favorite error messages:
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./c-decl.o differs
./cp/decl.o differs
./df-core.o differs
./gcc.o differs
./i386.o differs
./stor-layout.o differs
./tree-pretty-print.o differs
./tree.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
See PR3227.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61169
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 17 Dec 2008 22:54:54 +0000 (22:54 +0000)]
XFAIL for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61167
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 17 Dec 2008 22:53:09 +0000 (22:53 +0000)]
Xfail these tests for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61166
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 17 Dec 2008 22:39:29 +0000 (22:39 +0000)]
Today the front-ends (llvm-gcc and clang) generate multiple llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases.
First step to resolve this is, record file name and directory directly in debug info for various debug entities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61164
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 17 Dec 2008 22:17:27 +0000 (22:17 +0000)]
Revert r61158 for now, as it caused some test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61159
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 17 Dec 2008 22:06:59 +0000 (22:06 +0000)]
Fix miscompilations caused by renumbering, and enable it as part of prealloc splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Dec 2008 21:39:50 +0000 (21:39 +0000)]
This adds some missing functions to the C binding:
- ability to insert previously created instructions using a builder
- creation of aliases
- creation of inline asm constants
Patch by Zoltan Varga!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61153
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Dec 2008 20:59:57 +0000 (20:59 +0000)]
Forgot to revert r61031 when I reverted r61019, r61030, and r61040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61150
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 17 Dec 2008 18:11:40 +0000 (18:11 +0000)]
Simplified marking code regions -- no need to use <div> to surround <pre> tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61143
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 17 Dec 2008 18:06:53 +0000 (18:06 +0000)]
Instead of referring to the license file in the 2.3 release, refer to the
always-current SVN version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61142
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 17 Dec 2008 16:27:23 +0000 (16:27 +0000)]
Added mention of the RELEASE_24 tag for the 2.4 release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61138
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 17 Dec 2008 08:49:47 +0000 (08:49 +0000)]
Fix expansion of vsetcc to set the high bit for true instead of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61129
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Dec 2008 05:42:08 +0000 (05:42 +0000)]
insert some sequence points and preincrement an iterator to avoid
iterator invalidation problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Dec 2008 05:28:49 +0000 (05:28 +0000)]
Enhance heap sra to be substantially more aggressive w.r.t PHI
nodes. This allows it to do fairly general phi insertion if a
load from a pointer global wants to be SRAd but the load is used
by (recursive) phi nodes. This fixes a pessimization on ppc
introduced by Load PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61123
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Dec 2008 04:30:46 +0000 (04:30 +0000)]
Double the amount of memory reserved for SUnits. This is a
temporary workaround for an obscure bug. When node cloning is
used, it is possible that more SUnits will be created, and
if the SUnits std::vector has to reallocate, it will
invalidate all the graph edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61122
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Dec 2008 04:25:52 +0000 (04:25 +0000)]
Use getDepth() and getHeight() instead of accessing the
Depth and Height members directly, as they may not be
current.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61121
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Dec 2008 04:24:23 +0000 (04:24 +0000)]
Fix the comments for getDepth and getHeight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61120
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 17 Dec 2008 03:35:17 +0000 (03:35 +0000)]
Fix for PR3225: disable a broken optimization in
DAGTypeLegalizer::ExpandShiftWithKnownAmountBit.
In terms of restoring the optimization, the best fix here isn't
obvious... any ideas?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61119
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 17 Dec 2008 02:47:30 +0000 (02:47 +0000)]
Update also the generated docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61118
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 17 Dec 2008 02:47:01 +0000 (02:47 +0000)]
Some enhancements for the 'case' expression.
Add (error) and (empty).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61117
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Dec 2008 22:16:28 +0000 (22:16 +0000)]
Clarify that the scale factor from CheckForIVReuse
can be negative. Keep track of whether all uses of
an IV are outside the loop. Some cosmetics; no
functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61109
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Dec 2008 22:13:49 +0000 (22:13 +0000)]
A new dag combine; several permutations of this
are there under ADD, this one was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61107
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Dec 2008 21:35:08 +0000 (21:35 +0000)]
Add code to renumber split intervals into new vregs. This is disabled for now until I finish working out some iterator invalidation issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Dec 2008 21:24:51 +0000 (21:24 +0000)]
Fix another crash found by inspection. If we have a PHI node merging
the load multiple times, make sure the check the uses of the PHI to
ensure they are transformable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61102
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Dec 2008 21:04:51 +0000 (21:04 +0000)]
fix a crash found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61101
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Dec 2008 20:54:32 +0000 (20:54 +0000)]
Add a helper to remove a branch and DCE the condition, and use it
consistently for deleting branches. In addition to being slightly
more readable, this makes SimplifyCFG a bit better
about cleaning up after itself when it makes conditions unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61100
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 19:27:52 +0000 (19:27 +0000)]
Eliminate the loop that walks the critical path. Instead, just track the
position in the critical path during the main instruction walk. This
eliminates the need for the CritialAntiDep DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61096
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Dec 2008 19:07:17 +0000 (19:07 +0000)]
Remove empty test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61095
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Dec 2008 19:06:48 +0000 (19:06 +0000)]
Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61094
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 18:25:36 +0000 (18:25 +0000)]
Preserve SourceValue information when lowering produces multiple loads from
different offsets within the same stack slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61093
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Dec 2008 18:21:39 +0000 (18:21 +0000)]
We have decided not to support inline asm where an output operand with a matching input operand with incompatible type (i.e. either one is a floating point and the other is an integer or the sizes of the types differ). SelectionDAGBuild will catch these and exit with an error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61092
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 16 Dec 2008 12:25:04 +0000 (12:25 +0000)]
CMake: Added DbgInfoPrinter.cpp to lib/Analysis/CMakeFiles.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61087
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 16 Dec 2008 10:10:23 +0000 (10:10 +0000)]
add testcase for -print-dbginfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61086
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 16 Dec 2008 09:09:19 +0000 (09:09 +0000)]
Add -print-dbginfo pass that prints LLVM IR with comments inserted to show
which source/line a certain BB/instruction comes from, original variable names,
and original (unmangled) C++ name of functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61085
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 16 Dec 2008 09:07:36 +0000 (09:07 +0000)]
Add utility functions to search for DbgStopPointInst corresponding to an
instruction or BasicBlock, and to search for DbgDeclareInst corresponding to a
variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61084
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 16 Dec 2008 09:06:01 +0000 (09:06 +0000)]
use different name for parameter to make it clear that we set DIDescriptor::GV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61083
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 16 Dec 2008 08:30:01 +0000 (08:30 +0000)]
Generalize support for analyzing loops to include SLE/SGE loop exit conditions
and support for non-unit strides with signed exit conditions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Dec 2008 07:34:30 +0000 (07:34 +0000)]
switch some std::set/std::map to SmallPtrSet/DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Dec 2008 07:10:09 +0000 (07:10 +0000)]
fix PR3217: fully cached queries need to be verified against the
visited set before they are used. If used, their blocks need to be
added to the visited set so that subsequent queries don't use conflicting
pointer values in the cache result blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61080
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 06:21:45 +0000 (06:21 +0000)]
Enable anti-dependence breaking by default when post-RA scheduling is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61078
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 06:20:58 +0000 (06:20 +0000)]
When breaking an anti-dependency, don't use a register which has seen
one of its aliases defined. This is conservative, but tricky subreg
corner cases are outside the primary aim of this pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61077
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 03:35:01 +0000 (03:35 +0000)]
Add initial support for back-scheduling address computations,
especially in the case of addresses computed from loop induction
variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61075
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 03:31:11 +0000 (03:31 +0000)]
Remove some special-case logic in ScheduleDAGSDNodes's
latency computation code that is no longer needed with the
new method for handling latencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61074
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 03:25:46 +0000 (03:25 +0000)]
Fix some register-alias-related bugs in the post-RA scheduler liveness
computation code. Also, avoid adding output-depenency edges when both
defs are dead, which frequently happens with EFLAGS defs.
Compute Depth and Height lazily, and always in terms of edge latency
values. For the schedulers that don't care about latency, edge latencies
are set to 1.
Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array.
These are all subsumed by the Depth and Height fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61073
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 16 Dec 2008 03:07:49 +0000 (03:07 +0000)]
* Comply with HTML 4.01 Strict
* Added code-region markings to code sections to make them stand out
* Added pre.doc_code class to llvm.css to simplify marking code regions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61072
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 16 Dec 2008 02:54:22 +0000 (02:54 +0000)]
* Comply with HTML 4.01 Strict standard
* Converted absolute links to llvm.org/docs to relative links
* Fixed spelling and s/;/:/, as needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61071
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 02:38:22 +0000 (02:38 +0000)]
Add a simple target-independent heuristic to allow targets with no
instruction itinerary data to back-schedule loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61070
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 01:05:52 +0000 (01:05 +0000)]
Move addPred and removePred out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61067
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 01:00:55 +0000 (01:00 +0000)]
Make addPred and removePred return void, since the return value is not
currently used by anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61066
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 00:55:00 +0000 (00:55 +0000)]
This getEdgeAttributes doesn't need a template argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61065
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Dec 2008 00:51:33 +0000 (00:51 +0000)]
Add a getSDep() access function to SUnitIterator to return the
current SDep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61064
91177308-0d34-0410-b5e6-
96231b3b80d8