Dan Gohman [Sun, 27 Sep 2009 15:37:03 +0000 (15:37 +0000)]
Tell ScalarEvolution to forget everything it knows about a loop before
rotating the loop, since loop rotation is a very significant change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82901
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 27 Sep 2009 15:32:21 +0000 (15:32 +0000)]
Micro-optimize DerivedType::dropAllTypeUses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82900
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 27 Sep 2009 15:30:00 +0000 (15:30 +0000)]
Instead of testing whether an instruction dominates the loop preheader,
test whether it properly dominates the loop header. This is equivalent
when the loop has a preheader, and has the advantage of working when
the loop doesn't have a preheader. Since IVUsers doesn't Require
LoopSimplify, the loop isn't guaranteed to have a preheader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82899
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 27 Sep 2009 15:26:03 +0000 (15:26 +0000)]
Add a properlyDominates member function to ScalarEvolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82898
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 27 Sep 2009 15:21:52 +0000 (15:21 +0000)]
Remove a redundant #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82897
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sun, 27 Sep 2009 11:08:03 +0000 (11:08 +0000)]
Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
in RegisterStatistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82896
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 27 Sep 2009 09:46:04 +0000 (09:46 +0000)]
Enable pre-regalloc load / store multiple pass for Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82893
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Sep 2009 08:01:44 +0000 (08:01 +0000)]
rename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82892
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Sep 2009 07:56:52 +0000 (07:56 +0000)]
implement and document support for filecheck variables. This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.
Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82891
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 07:55:32 +0000 (07:55 +0000)]
Remove dead code from this function and optimize. Update its corresponding
LangRef entry too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82890
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 07:38:41 +0000 (07:38 +0000)]
Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 06:25:05 +0000 (06:25 +0000)]
Filecheckify this one test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82888
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 04:57:35 +0000 (04:57 +0000)]
Leave a pointer to the documentation so that people don't end up change one but
not the other in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82887
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 04:56:27 +0000 (04:56 +0000)]
Correct the version numbers to match those actually tested for by
autoconf/AutoRegen.sh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82886
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Sep 2009 00:45:11 +0000 (00:45 +0000)]
Move the integer type out of 'derived' and into 'primitive'. This permits us
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.
Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82884
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Sep 2009 21:27:04 +0000 (21:27 +0000)]
remove support for "NoSub" from regex. It seems like a minor optimization
and makes the API more annoying. Add a Regex::getNumMatches() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sat, 26 Sep 2009 20:18:58 +0000 (20:18 +0000)]
Speed up clang-only link, by really linking only clang, and not the unittests
too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82873
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Sep 2009 18:51:37 +0000 (18:51 +0000)]
Remove this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82869
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 18:10:13 +0000 (18:10 +0000)]
Fix SimplifyLibCalls to transfer attributes from callees rather than
calls, since direct calls don't always reflect the attributes of their
callees.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82867
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 16:11:57 +0000 (16:11 +0000)]
Fix a case where ScalarEvolution was expanding pointer arithmetic
to inttoptr/ptrtoint unnecessarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82864
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 26 Sep 2009 15:35:35 +0000 (15:35 +0000)]
For the NSWSub support in the builder to actually be useable,
there need to be corresponding changes to the constant folders,
done in this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82862
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 15:24:17 +0000 (15:24 +0000)]
Convert comparisons like (x == infinity) to (x >= infinity) on targets
where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82861
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 26 Sep 2009 15:21:48 +0000 (15:21 +0000)]
Add methods for creating NSW subtraction, as already exists
for addition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82860
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 15:09:53 +0000 (15:09 +0000)]
Add a comment describing natural loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82859
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Sep 2009 05:29:36 +0000 (05:29 +0000)]
"Update" tests for -disable-if-conversion removal. I think branch.ll should just
be removed, but I XFAIL'd it for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82847
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Sep 2009 02:49:49 +0000 (02:49 +0000)]
Really remove this option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82838
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Sep 2009 02:45:45 +0000 (02:45 +0000)]
Remove a couple of unused command line options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82837
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Sep 2009 02:43:36 +0000 (02:43 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82836
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Sep 2009 02:41:17 +0000 (02:41 +0000)]
Convert test to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82835
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 02:34:00 +0000 (02:34 +0000)]
Don't hoist or sink instructions with physreg uses if the physreg is
allocatable. Even if it doesn't appear to have any defs, it may latter
on after register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82834
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 01:11:57 +0000 (01:11 +0000)]
I put the wrong rdar number in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82829
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 23:58:45 +0000 (23:58 +0000)]
Unbreak MachineLICM for instructions that reference RIP on x86-64 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82825
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 23:40:21 +0000 (23:40 +0000)]
Rename ConstantFP's getInf to getInfinity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82823
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 23:33:20 +0000 (23:33 +0000)]
Move MachineMemOperand::getAlignment out of line, to avoid needing
MathExtras.h in MachineMemOperand.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82822
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Sep 2009 23:26:56 +0000 (23:26 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82821
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 23:10:17 +0000 (23:10 +0000)]
Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is
typically faster then doing a general pow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82819
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 23:00:48 +0000 (23:00 +0000)]
Add a ConstantFP::getInf utility function for creating infinity ConstantFPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82818
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 22:53:29 +0000 (22:53 +0000)]
Fix MachineSink to be able to sink instructions that use physical registers
which have no defs anywhere in the function. In particular, this fixes sinking
of instructions that reference RIP on x86-64, which is currently being modeled
as a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82815
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 25 Sep 2009 22:53:17 +0000 (22:53 +0000)]
Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82814
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 25 Sep 2009 22:52:29 +0000 (22:52 +0000)]
Provide proper masks for neon perfect shuffle table.
I definitely need to read documentation better :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82813
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 22:26:13 +0000 (22:26 +0000)]
Simplify a few more uses of reg_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82812
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 22:24:52 +0000 (22:24 +0000)]
Simplify this code by using use_iterator instead of reg_iterator
and skipping the defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82811
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 25 Sep 2009 21:44:53 +0000 (21:44 +0000)]
Code clean up and prepare for Thumb2 support. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82805
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 25 Sep 2009 21:38:11 +0000 (21:38 +0000)]
Flip -disable-post-RA-scheduler to -post-RA-scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82803
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 25 Sep 2009 21:07:20 +0000 (21:07 +0000)]
Fix a compile failure introduced by r82675 on MinGW which doesn't have
setenv(). This patch just disables the test rather than getting putenv() to
work. Thanks to Sandeep Patel for reporting the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82797
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 25 Sep 2009 20:54:50 +0000 (20:54 +0000)]
Handle sqrt in CannotBeNegativeZero. absf and absl
appear to be misspellings, removed in favor of fabs*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82796
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 20:36:54 +0000 (20:36 +0000)]
Improve MachineMemOperand handling.
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
This eliminates MachineInstr's std::list member and allows the data to be
created by isel and live for the remainder of codegen, avoiding a lot of
copying and unnecessary translation. This also shrinks MemSDNode.
- Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
fields for MachineMemOperands.
- Change MemSDNode to have a MachineMemOperand member instead of its own
fields with the same information. This introduces some redundancy, but
it's more consistent with what MachineInstr will eventually want.
- Ignore alignment when searching for redundant loads for CSE, but remember
the greatest alignment.
Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82794
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 18:54:59 +0000 (18:54 +0000)]
Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82790
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Fri, 25 Sep 2009 18:38:29 +0000 (18:38 +0000)]
Finish scheduling itineraries for NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82788
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 25 Sep 2009 18:15:29 +0000 (18:15 +0000)]
Add readonly to some sin and cos calls; transformations
being checked aren't valid without it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82786
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 25 Sep 2009 18:11:52 +0000 (18:11 +0000)]
Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 25 Sep 2009 18:00:35 +0000 (18:00 +0000)]
Make sure sin, cos, sqrt calls are marked readonly
before producing FSIN, FCOS, FSQRT. If they aren't
so marked we have to assume they might set errno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 17:29:36 +0000 (17:29 +0000)]
reject attempts to use ()'s in patterns, these are reserved for filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 17:23:43 +0000 (17:23 +0000)]
reimplement the regex matching strategy by building a single
regex and matching it instead of trying to match chunks at a time.
Matching chunks at a time broke with check lines like
CHECK: foo {{.*}}bar
because the .* would eat the entire rest of the line and bar would
never match.
Now we just escape the fixed strings for the user, so that something
like:
CHECK: a() {{.*}}???
is matched as:
CHECK: {{a\(\) .*\?\?\?}}
transparently "under the covers".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82779
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 25 Sep 2009 17:23:22 +0000 (17:23 +0000)]
Generate FSQRT from calls to the sqrt function, which
allows appropriate backends to generate a sqrt instruction.
On x86, this isn't done at -O0 because we go through
FastISel instead. This is a behavior change from before
this series of sqrt patches started. I think this is OK
considering that compile speed is most important at -O0, but
could be convinced otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 17:09:12 +0000 (17:09 +0000)]
special case Patterns that are a single fixed string. This is a microscopic
perf win and is needed for future changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82777
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 25 Sep 2009 17:04:42 +0000 (17:04 +0000)]
Revise C library functions description to be vaguer, per Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82776
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 25 Sep 2009 16:46:09 +0000 (16:46 +0000)]
This patch causes the --enable-debug-runtime configure flag and the
DEBUG_RUNTIME Makefile variable to pass -g to gcc when building LLVM's objects.
Without this, it's very hard to debug crashes that happen in Release-Asserts
mode but not Debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82775
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 25 Sep 2009 16:34:46 +0000 (16:34 +0000)]
Add some comments to clarify things that I discovered this week.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82773
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Sep 2009 16:04:21 +0000 (16:04 +0000)]
Make llvm-bcanalyzer percentages more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82772
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Sep 2009 16:03:57 +0000 (16:03 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82771
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 25 Sep 2009 14:41:49 +0000 (14:41 +0000)]
pr4926: ARM requires the stack pointer to be aligned, even for leaf functions.
For the AAPCS ABI, SP must always be 4-byte aligned, and at any "public
interface" it must be 8-byte aligned. For the older ARM APCS ABI, the stack
alignment is just always 4 bytes. For X86, we currently align SP at
entry to a function (e.g., to 16 bytes for Darwin), but no stack alignment
is needed at other times, such as for a leaf function.
After discussing this with Dan, I decided to go with the approach of adding
a new "TransientStackAlignment" field to TargetFrameInfo. This value
specifies the stack alignment that must be maintained even in between calls.
It defaults to 1 except for ARM, where it is 4. (Some other targets may
also want to set this if they have similar stack requirements. It's not
currently required for PPC because it sets targetHandlesStackFrameRounding
and handles the alignment in target-specific code.) The existing StackAlignment
value specifies the alignment upon entry to a function, which is how we've
been using it anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82767
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 25 Sep 2009 12:28:37 +0000 (12:28 +0000)]
Print INST_INBOUNDS_GEP rather than UnknownCode30.
Likewise for constant inbounds GEP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 06:49:41 +0000 (06:49 +0000)]
convert testcases to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82759
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 06:47:09 +0000 (06:47 +0000)]
filecheck should not match a \n with a .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 06:37:22 +0000 (06:37 +0000)]
remove a large unreduced testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 06:32:47 +0000 (06:32 +0000)]
turn a std::pair into a real class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82754
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 25 Sep 2009 06:05:26 +0000 (06:05 +0000)]
Fix combiner-aa issue with bases which are different, but can alias.
Previously, it treated GV+28 GV+0 as different bases, and assumed they could
not alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82753
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 25 Sep 2009 05:30:55 +0000 (05:30 +0000)]
Update the description of MachineFrameInfo's OffsetAdjustment. The value of
this adjustment does not change the direction or the signs of the object
offsets, and the details of the offset calculations can be target-specific.
Also mention that for most targets this value is only used to generate debug
info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82750
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 00:57:30 +0000 (00:57 +0000)]
Don't try to use pre-indexed addressing with sthbrx/stwbrx
instructions. This fixes a PowerPC bug exposed by some unrelated
changes I'm working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82743
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 25 Sep 2009 00:34:34 +0000 (00:34 +0000)]
Add a version of dumpr() that has a SelectionDAG* argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82742
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 24 Sep 2009 23:52:18 +0000 (23:52 +0000)]
Start of revamping the register scavenging in PEI. ARM Thumb1 is the driving
interest for this, as it currently reserves a register rather than using
the scavenger for matierializing constants as needed.
Instead of scavenging registers on the fly while eliminating frame indices,
new virtual registers are created, and then a scavenged collectively in a
post-pass over the function. This isolates the bits that need to interact
with the scavenger, and sets the stage for more intelligent use, and reuse,
of scavenged registers.
For the time being, this is disabled by default. Once the bugs are worked out,
the current scavenging calls in replaceFrameIndices() will be removed and
the post-pass scavenging will be the default. Until then,
-enable-frame-index-scavenging enables the new code. Currently, only the
Thumb1 back end is set up to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82734
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 24 Sep 2009 23:37:40 +0000 (23:37 +0000)]
Reenable sqrt IR generation test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82731
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Sep 2009 23:21:26 +0000 (23:21 +0000)]
Delete space after function name, before (, reflow a comment and
delete a few blank lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82729
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 24 Sep 2009 23:11:08 +0000 (23:11 +0000)]
Fix spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 21:47:32 +0000 (21:47 +0000)]
add and document regex support for FileCheck. You can now do stuff like:
; CHECK: movl {{%e[a-z][xi]}}, %eax
or whatever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 21:45:57 +0000 (21:45 +0000)]
unconditionally request MMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82716
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 21:44:20 +0000 (21:44 +0000)]
wrap long lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82715
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 20:45:07 +0000 (20:45 +0000)]
Use CanonicalizeInputFile to canonicalize the entire buffer containing the
CHECK strings, instead of canonicalizing the patterns directly. This allows
Pattern to just contain a StringRef instead of std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82713
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 20:39:13 +0000 (20:39 +0000)]
change 'not' matching to use Pattern, move pattern parsing logic into
the Pattern class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82712
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 20:25:55 +0000 (20:25 +0000)]
refactor out the match string into its own Pattern class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 24 Sep 2009 20:23:02 +0000 (20:23 +0000)]
Convert to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82710
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Thu, 24 Sep 2009 20:22:50 +0000 (20:22 +0000)]
Make the end-of-itinerary mark explicit. Some cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82709
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 24 Sep 2009 20:20:08 +0000 (20:20 +0000)]
Add nounwind to this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 20:15:51 +0000 (20:15 +0000)]
tidy up, fix a memory leak in Regex::isValid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82707
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 24 Sep 2009 18:38:21 +0000 (18:38 +0000)]
Clarify that llvm attaches C language semantics to
functions with names that match the C library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82701
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 24 Sep 2009 18:33:42 +0000 (18:33 +0000)]
Constant propagating byval pointer is safe if function is readonly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82700
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 24 Sep 2009 17:47:49 +0000 (17:47 +0000)]
Auto-upgrade malloc instructions to malloc calls.
Reviewed by Devang Patel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 24 Sep 2009 16:42:27 +0000 (16:42 +0000)]
Fix a hypothetical problem for targets with StackGrowsUp and a non-zero
LocalAreaOffset. (We don't have any of those right now.)
PEI::calculateFrameObjectOffsets includes the absolute value of the
LocalAreaOffset in the cumulative offset value used to calculate the
stack frame size. It then adds the raw value of the LocalAreaOffset
to the stack size. For a StackGrowsDown target, that raw value is negative
and has the effect of cancelling out the absolute value that was added
earlier, but that obviously won't work for a StackGrowsUp target. Change
to subtract the absolute value of the LocalAreaOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82693
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 24 Sep 2009 16:19:11 +0000 (16:19 +0000)]
Move parent assertion check before metadata deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82692
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 24 Sep 2009 09:47:18 +0000 (09:47 +0000)]
Don't constant propagate byval pointers, since they are not really pointers, but
rather structs passed by value.
This fixes PR5038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82689
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 24 Sep 2009 06:23:57 +0000 (06:23 +0000)]
Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82685
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 05:44:53 +0000 (05:44 +0000)]
unconditionally compute MMI even if the target doesn't support EH or Debug info, because the target may use it for other things, this fixes PR5036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 05:38:36 +0000 (05:38 +0000)]
reapply r82348 with a fix, thanks Jeffrey.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82683
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Sep 2009 02:27:09 +0000 (02:27 +0000)]
Fix PR5024 with a big hammer: disable the double-def assertion in the scavenger.
LiveVariables add implicit kills to correctly track partial register kills. This works well enough and is fairly accurate. But coalescer can make it impossible to maintain these markers. e.g.
BL <ga:sss1>, %R0<kill,undef>, %S0<kill>, %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>, ...
...
%reg1031<def> = FLDS <cp#1>, 0, 14, %reg0, Mem:LD4[ConstantPool]
...
%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>
When reg1031 and S0 are coalesced, the copy (FCPYS) will be eliminated the the implicit-kill of D0 is lost. In this case it's possible to move the marker to the FLDS. But in many cases, this is not possible. Suppose
%reg1031<def> = FOO <cp#1>, %D0<imp-def>
...
%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>
When FCPYS goes away, the definition of S0 is the "FOO" instruction. However, transferring the D0 implicit-kill to FOO doesn't work since it is the def of D0 itself. We need to fix this in another time by introducing a "kill" pseudo instruction to track liveness.
Disabling the assertion is not ideal, but machine verifier is doing that job now. It's important to know double-def is not a miscomputation since it means a register should be free but it's not tracked as free. It's a performance issue instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82677
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Sep 2009 02:15:22 +0000 (02:15 +0000)]
Clean up LiveVariables and change how it deals with partial updates and kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82676
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 24 Sep 2009 01:14:07 +0000 (01:14 +0000)]
Roll back r82348, which introduced an infinite loop in ParseCStringVector() that
a trivial unittest would have caught. This revision also adds the trivial
unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82675
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 23 Sep 2009 22:05:24 +0000 (22:05 +0000)]
A minor improvment in accuracy to inline cost
computation, and some cosmetics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82660
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 23 Sep 2009 21:46:36 +0000 (21:46 +0000)]
Disable test; what it's testing for is wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82658
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 23 Sep 2009 21:38:08 +0000 (21:38 +0000)]
Checkpoint NEON scheduling itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82657
91177308-0d34-0410-b5e6-
96231b3b80d8