oota-llvm.git
15 years agoChanges (* location in pointer variables, avoiding include, and using APInt::getLimit...
Victor Hernandez [Tue, 3 Nov 2009 20:02:35 +0000 (20:02 +0000)]
Changes (* location in pointer variables, avoiding include, and using APInt::getLimitedValue) based on feedback to r85814

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoturn IPSCCP back on by default, try #3 or 4? Woo.
Chris Lattner [Tue, 3 Nov 2009 19:35:13 +0000 (19:35 +0000)]
turn IPSCCP back on by default, try #3 or 4? Woo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix an IPSCCP bug I introduced when I changed IPSCCP to start working on
Chris Lattner [Tue, 3 Nov 2009 19:24:51 +0000 (19:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85923 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake this code more robust by not thinking we are making progress
Duncan Sands [Tue, 3 Nov 2009 19:10:22 +0000 (19:10 +0000)]
Make this code more robust by not thinking we are making progress
if zero bytes were read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85922 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoParse debug info attached with insertvalue and extractvalue instructions.
Devang Patel [Tue, 3 Nov 2009 19:06:07 +0000 (19:06 +0000)]
Parse debug info attached with insertvalue and extractvalue instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove subtarget check upper for NEON reg-reg fixup pass.
Anton Korobeynikov [Tue, 3 Nov 2009 18:46:11 +0000 (18:46 +0000)]
Move subtarget check upper for NEON reg-reg fixup pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85914 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomark some constant global const.
Chris Lattner [Tue, 3 Nov 2009 18:30:31 +0000 (18:30 +0000)]
mark some constant global const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85910 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore unnamed variables.
Devang Patel [Tue, 3 Nov 2009 18:30:27 +0000 (18:30 +0000)]
Ignore unnamed variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85909 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoxfail this test since daniel turned off ipsccp
Chris Lattner [Tue, 3 Nov 2009 17:54:12 +0000 (17:54 +0000)]
xfail this test since daniel turned off ipsccp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85907 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotestcase for r85903
Chris Lattner [Tue, 3 Nov 2009 17:03:02 +0000 (17:03 +0000)]
testcase for r85903

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85906 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a subtle bug I introduced when refactoring SCCP. Testcase
Chris Lattner [Tue, 3 Nov 2009 16:50:11 +0000 (16:50 +0000)]
fix a subtle bug I introduced when refactoring SCCP.  Testcase
to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85903 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake opt default to not adding a target data string and update tests that depend...
Kenneth Uildriks [Tue, 3 Nov 2009 15:29:06 +0000 (15:29 +0000)]
Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded a comment to a function that had none
Kenneth Uildriks [Tue, 3 Nov 2009 15:25:20 +0000 (15:25 +0000)]
Added a comment to a function that had none

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate some temporaries.
Benjamin Kramer [Tue, 3 Nov 2009 12:52:50 +0000 (12:52 +0000)]
Eliminate some temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85896 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRun the functionattrs pass after the inliner, and not before.
Duncan Sands [Tue, 3 Nov 2009 09:40:08 +0000 (09:40 +0000)]
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
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSpeculatively redisable IPSCCP, I think its still breaking things.
Daniel Dunbar [Tue, 3 Nov 2009 07:49:22 +0000 (07:49 +0000)]
Speculatively redisable IPSCCP, I think its still breaking things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolit: Update Clang's test style to use XFAIL: and XTARGET: lines that match
Daniel Dunbar [Tue, 3 Nov 2009 07:26:38 +0000 (07:26 +0000)]
lit: Update Clang's test style to use XFAIL: and XTARGET: lines that match
LLVM's tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85882 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTrim unnecessary include.
Evan Cheng [Tue, 3 Nov 2009 07:08:08 +0000 (07:08 +0000)]
Trim unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85878 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor Thumb indirect branches, use "mov pc, reg" which does not switch
Bob Wilson [Tue, 3 Nov 2009 06:29:56 +0000 (06:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85874 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a funky "declared with greater visibility than the type of its field"
Jeffrey Yasskin [Tue, 3 Nov 2009 06:29:36 +0000 (06:29 +0000)]
Fix a funky "declared with greater visibility than the type of its field"
warning from gcc by removing VISIBILITY_HIDDEN attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85873 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5367. QPR_8 is the super regclass of DPR_8 and SPR_8.
Evan Cheng [Tue, 3 Nov 2009 05:52:54 +0000 (05:52 +0000)]
Fix PR5367. QPR_8 is the super regclass of DPR_8 and SPR_8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85871 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up copyRegToReg.
Evan Cheng [Tue, 3 Nov 2009 05:51:39 +0000 (05:51 +0000)]
Clean up copyRegToReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85870 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd QPR_8 as a superreg class of SPR_8 and DPR_8.
Evan Cheng [Tue, 3 Nov 2009 05:50:57 +0000 (05:50 +0000)]
Add QPR_8 as a superreg class of SPR_8 and DPR_8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85869 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove unneeded checks of isFreeCall
Chris Lattner [Tue, 3 Nov 2009 05:35:19 +0000 (05:35 +0000)]
remove unneeded checks of isFreeCall

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a check of isFreeCall: the argument to free is already nocapture so the generi...
Chris Lattner [Tue, 3 Nov 2009 05:34:51 +0000 (05:34 +0000)]
remove a check of isFreeCall: the argument to free is already nocapture so the generic call code works fine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a isFreeCall check: it is a callinst that can write to memory already.
Chris Lattner [Tue, 3 Nov 2009 05:33:46 +0000 (05:33 +0000)]
remove a isFreeCall check: it is a callinst that can write to memory already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate CMake file.
Ted Kremenek [Tue, 3 Nov 2009 04:14:12 +0000 (04:14 +0000)]
Update CMake file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85861 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport updating 'llvm_add_target' lists as well.
Ted Kremenek [Tue, 3 Nov 2009 04:06:58 +0000 (04:06 +0000)]
Support updating 'llvm_add_target' lists as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85860 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlphabetize.
Ted Kremenek [Tue, 3 Nov 2009 04:01:53 +0000 (04:01 +0000)]
Alphabetize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85859 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoturn IPSCCP back on now that the iterator invalidation bug is fixed.
Chris Lattner [Tue, 3 Nov 2009 03:42:51 +0000 (03:42 +0000)]
turn IPSCCP back on now that the iterator invalidation bug is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85858 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a couple more target nodes
Nate Begeman [Tue, 3 Nov 2009 03:30:51 +0000 (03:30 +0000)]
Add a couple more target nodes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85857 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDeclare sin & cos as readonly so they match the code in SelectionDAGBuild
Nate Begeman [Tue, 3 Nov 2009 02:19:31 +0000 (02:19 +0000)]
Declare sin & cos as readonly so they match the code in SelectionDAGBuild

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85853 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTurn neon reg-reg moves fixup code into separate pass. This should reduce the compile...
Anton Korobeynikov [Tue, 3 Nov 2009 01:04:26 +0000 (01:04 +0000)]
Turn neon reg-reg moves fixup code into separate pass. This should reduce the compile time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85850 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporary xfail until PR5367 will be resolved
Anton Korobeynikov [Tue, 3 Nov 2009 00:37:36 +0000 (00:37 +0000)]
Temporary xfail until PR5367 will be resolved

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85848 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r85049, it is causing PR5367
Anton Korobeynikov [Tue, 3 Nov 2009 00:24:48 +0000 (00:24 +0000)]
Revert r85049, it is causing PR5367

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85847 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert previous change to a comment. The BlockAddresses go in the
Bob Wilson [Tue, 3 Nov 2009 00:02:05 +0000 (00:02 +0000)]
Revert previous change to a comment.  The BlockAddresses go in the
constant pool so they don't get wrapped separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85844 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a nasty iterator invalidation bug from my conversion from
Chris Lattner [Mon, 2 Nov 2009 23:25:39 +0000 (23:25 +0000)]
fix a nasty iterator invalidation bug from my conversion from
std::map to DenseMap, exposed on release llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85840 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 85799 for now. It might be breaking llvm-gcc driver.
Evan Cheng [Mon, 2 Nov 2009 21:49:14 +0000 (21:49 +0000)]
Revert 85799 for now. It might be breaking llvm-gcc driver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85827 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPut BlockAddresses into ARM constant pools.
Bob Wilson [Mon, 2 Nov 2009 20:59:23 +0000 (20:59 +0000)]
Put BlockAddresses into ARM constant pools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85824 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix ARMAsmParser::ParseMemoryOffsetReg() where the parameter OffsetRegNum should
Kevin Enderby [Mon, 2 Nov 2009 20:14:39 +0000 (20:14 +0000)]
Fix ARMAsmParser::ParseMemoryOffsetReg() where the parameter OffsetRegNum should
have been passed as a reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85823 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorevert r8579[56], which are causing unhappiness in buildbot land.
Chris Lattner [Mon, 2 Nov 2009 19:31:10 +0000 (19:31 +0000)]
revert r8579[56], which are causing unhappiness in buildbot land.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85818 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: Report an error if there is an unknown .cpp file in a source
Oscar Fuentes [Mon, 2 Nov 2009 19:11:03 +0000 (19:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85817 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet bit instead of calling pow() to compute 2 << n
Victor Hernandez [Mon, 2 Nov 2009 18:51:28 +0000 (18:51 +0000)]
Set bit instead of calling pow() to compute 2 << n

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotypo
Chris Lattner [Mon, 2 Nov 2009 18:28:45 +0000 (18:28 +0000)]
typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85812 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge 2008-03-10-sret.ll into ipsccp-basic.ll, and upgrade its syntax.
Chris Lattner [Mon, 2 Nov 2009 18:27:22 +0000 (18:27 +0000)]
merge 2008-03-10-sret.ll into ipsccp-basic.ll, and upgrade its syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85811 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodisable IPSCCP support for multiple return values, it is buggy, so just
Chris Lattner [Mon, 2 Nov 2009 18:22:51 +0000 (18:22 +0000)]
disable IPSCCP support for multiple return values, it is buggy, so just
disable it until I can fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85810 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix schedule model for BFC.
David Goodwin [Mon, 2 Nov 2009 17:28:36 +0000 (17:28 +0000)]
Fix schedule model for BFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85809 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHyphenate some comments.
Bob Wilson [Mon, 2 Nov 2009 17:10:37 +0000 (17:10 +0000)]
Hyphenate some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85808 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChain dependencies used to enforce memory order should have latency of 0 (except...
David Goodwin [Mon, 2 Nov 2009 17:06:28 +0000 (17:06 +0000)]
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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85807 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for BlockAddress values in ARM constant pools.
Bob Wilson [Mon, 2 Nov 2009 16:59:06 +0000 (16:59 +0000)]
Add support for BlockAddress values in ARM constant pools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85806 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrune unnecessary include.
Bob Wilson [Mon, 2 Nov 2009 16:58:31 +0000 (16:58 +0000)]
Prune unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85805 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitilize the machine LICM CSE map upon the first time an instruction is hoisted to
Evan Cheng [Mon, 2 Nov 2009 08:09:49 +0000 (08:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85799 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThese are done / no longer care.
Evan Cheng [Mon, 2 Nov 2009 07:58:25 +0000 (07:58 +0000)]
These are done / no longer care.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85798 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an entry.
Evan Cheng [Mon, 2 Nov 2009 07:51:19 +0000 (07:51 +0000)]
Add an entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85797 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agonow that ip sccp *really* subsumes ipcp, remove ipcp again.
Chris Lattner [Mon, 2 Nov 2009 07:34:29 +0000 (07:34 +0000)]
now that ip sccp *really* subsumes ipcp, remove ipcp again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85796 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove IPSCCP to be able to propagate the result of "!mayBeOverridden"
Chris Lattner [Mon, 2 Nov 2009 07:33:59 +0000 (07:33 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85795 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an irrelevant and poorly reduced test case.
Evan Cheng [Mon, 2 Nov 2009 07:11:54 +0000 (07:11 +0000)]
Remove an irrelevant and poorly reduced test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85794 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodon't mark the arguments of prototype overdefined, they will never be queried.
Chris Lattner [Mon, 2 Nov 2009 06:34:04 +0000 (06:34 +0000)]
don't mark the arguments of prototype overdefined, they will never be queried.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85793 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorestore some code I removed in r85788, refactor it into
Chris Lattner [Mon, 2 Nov 2009 06:28:16 +0000 (06:28 +0000)]
restore some code I removed in r85788, refactor it into
a shared place instead of duplicating it 4 times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85792 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some confused code that dates from when we had
Chris Lattner [Mon, 2 Nov 2009 06:17:06 +0000 (06:17 +0000)]
remove some confused code that dates from when we had
"multiple return values" but not "first class aggregates"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85791 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoavoid redundant lookups in BBExecutable, and make it a SmallPtrSet.
Chris Lattner [Mon, 2 Nov 2009 06:11:23 +0000 (06:11 +0000)]
avoid redundant lookups in BBExecutable, and make it a SmallPtrSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85790 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse the libanalysis 'ConstantFoldLoadFromConstPtr' function
Chris Lattner [Mon, 2 Nov 2009 06:06:14 +0000 (06:06 +0000)]
Use the libanalysis 'ConstantFoldLoadFromConstPtr' function
instead of reinventing SCCP-specific logic.  This gives us
new powers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85789 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch the main 'ValueState' map from being an std::map to being
Chris Lattner [Mon, 2 Nov 2009 05:55:40 +0000 (05:55 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85788 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak ARMBaseRegisterInfo::copyRegToReg.
Evan Cheng [Mon, 2 Nov 2009 04:44:55 +0000 (04:44 +0000)]
Unbreak ARMBaseRegisterInfo::copyRegToReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85787 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a bug exposed by moving SRoA earlier which caused a crash building kc++
Chris Lattner [Mon, 2 Nov 2009 04:37:17 +0000 (04:37 +0000)]
fix a bug exposed by moving SRoA earlier which caused a crash building kc++

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85786 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissing bit of universal built + hosted
Jim Grosbach [Mon, 2 Nov 2009 03:46:35 +0000 (03:46 +0000)]
Missing bit of universal built + hosted

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85785 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoonly IPSCCP incoming arguments if the function is executable, this fixes
Chris Lattner [Mon, 2 Nov 2009 03:25:55 +0000 (03:25 +0000)]
only IPSCCP incoming arguments if the function is executable, this fixes
an assertion on the buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a new ValueState::getConstantInt() helper, use it to
Chris Lattner [Mon, 2 Nov 2009 03:21:36 +0000 (03:21 +0000)]
add a new ValueState::getConstantInt() helper, use it to
simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85783 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix malloc.h is deprecated warning on DragonFly BSD.
Edward O'Callaghan [Mon, 2 Nov 2009 03:20:57 +0000 (03:20 +0000)]
Fix malloc.h is deprecated warning on DragonFly BSD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85782 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of...
Edward O'Callaghan [Mon, 2 Nov 2009 03:14:31 +0000 (03:14 +0000)]
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85781 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotidy up some more: remove some extraneous inline specifiers, return harder.
Chris Lattner [Mon, 2 Nov 2009 03:03:42 +0000 (03:03 +0000)]
tidy up some more: remove some extraneous inline specifiers, return harder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85780 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoApply fix for PR5135, Credit to Andreas Neustifter.
Edward O'Callaghan [Mon, 2 Nov 2009 02:55:39 +0000 (02:55 +0000)]
Apply fix for PR5135, Credit to Andreas Neustifter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85779 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoeliminate the SCCPSolver::getValueMapping method.
Chris Lattner [Mon, 2 Nov 2009 02:54:24 +0000 (02:54 +0000)]
eliminate the SCCPSolver::getValueMapping method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85778 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix failures introduced in r85774
Chris Lattner [Mon, 2 Nov 2009 02:48:17 +0000 (02:48 +0000)]
fix failures introduced in r85774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85777 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofactor duplicated code into a new DeleteInstructionInBlock
Chris Lattner [Mon, 2 Nov 2009 02:47:51 +0000 (02:47 +0000)]
factor duplicated code into a new DeleteInstructionInBlock
function, eliminate temporary (and pointless) smallvector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85776 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChris used to use '...' instead of proper grammar.
Chris Lattner [Mon, 2 Nov 2009 02:33:50 +0000 (02:33 +0000)]
Chris used to use '...' instead of proper grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85775 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some extraneous llvmcontext stuff.
Chris Lattner [Mon, 2 Nov 2009 02:30:06 +0000 (02:30 +0000)]
remove some extraneous llvmcontext stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85774 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agochange LatticeVal to use PointerIntPair to save some space.
Chris Lattner [Mon, 2 Nov 2009 02:20:32 +0000 (02:20 +0000)]
change LatticeVal to use PointerIntPair to save some space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85773 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix instcombine to only do store sinking when the alignments
Chris Lattner [Mon, 2 Nov 2009 02:06:37 +0000 (02:06 +0000)]
fix instcombine to only do store sinking when the alignments
of the two loads agree.  Propagate that onto the new store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85772 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge a test into store.ll
Chris Lattner [Mon, 2 Nov 2009 02:00:18 +0000 (02:00 +0000)]
merge a test into store.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85771 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert to filecheck
Chris Lattner [Mon, 2 Nov 2009 01:58:03 +0000 (01:58 +0000)]
convert to filecheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85770 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing end-tag.
Bill Wendling [Mon, 2 Nov 2009 00:25:26 +0000 (00:25 +0000)]
Add missing end-tag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85769 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome formatting changes.
Bill Wendling [Mon, 2 Nov 2009 00:24:16 +0000 (00:24 +0000)]
Some formatting changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85768 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle splats of undefs properly. This includes the testcase for PR5364 as well.
Anton Korobeynikov [Mon, 2 Nov 2009 00:12:06 +0000 (00:12 +0000)]
Handle splats of undefs properly. This includes the testcase for PR5364 as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85767 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not infer the target type for COPY_TO_REGCLASS from dest regclass, this won't...
Anton Korobeynikov [Mon, 2 Nov 2009 00:11:39 +0000 (00:11 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago64-bit FP loads & stores operate on both NEON and VFP pipelines.
Anton Korobeynikov [Mon, 2 Nov 2009 00:11:06 +0000 (00:11 +0000)]
64-bit FP loads & stores operate on both NEON and VFP pipelines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85765 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse NEON reg-reg moves, where profitable. This reduces "domain-cross" stalls, when...
Anton Korobeynikov [Mon, 2 Nov 2009 00:10:38 +0000 (00:10 +0000)]
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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85764 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd PseudoSourceValue::mayAlias. It returns true if the object can ever alias any...
Evan Cheng [Sun, 1 Nov 2009 23:50:04 +0000 (23:50 +0000)]
Add PseudoSourceValue::mayAlias. It returns true if the object can ever alias any LLVM IR value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85762 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLine this up as well.
Nick Lewycky [Sun, 1 Nov 2009 22:08:51 +0000 (22:08 +0000)]
Line this up as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85748 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix whitespace.
Nick Lewycky [Sun, 1 Nov 2009 22:07:54 +0000 (22:07 +0000)]
Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85747 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a couple more places where we are creating ld / st instructions without memoperands.
Evan Cheng [Sun, 1 Nov 2009 22:04:35 +0000 (22:04 +0000)]
Fix a couple more places where we are creating ld / st instructions without memoperands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85746 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake use of imm12 version of Thumb2 ldr / str instructions more aggressively.
Evan Cheng [Sun, 1 Nov 2009 21:12:51 +0000 (21:12 +0000)]
Make use of imm12 version of Thumb2 ldr / str instructions more aggressively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85743 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix two strange things in the default passmgr:
Chris Lattner [Sun, 1 Nov 2009 20:41:59 +0000 (20:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge phi-merge.ll into phi.ll
Chris Lattner [Sun, 1 Nov 2009 20:10:11 +0000 (20:10 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowhen merging two loads, make sure to take the min of their alignment,
Chris Lattner [Sun, 1 Nov 2009 20:07:07 +0000 (20:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit load sinking out to its own function, like gep sinking.
Chris Lattner [Sun, 1 Nov 2009 20:04:24 +0000 (20:04 +0000)]
split load sinking out to its own function, like gep sinking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85737 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a bug noticed by inspection: when instcombine sinks loads through
Chris Lattner [Sun, 1 Nov 2009 19:50:13 +0000 (19:50 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85736 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIPSCCP apparently is not a superset of IPCP, this is bad,
Chris Lattner [Sun, 1 Nov 2009 19:29:12 +0000 (19:29 +0000)]
IPSCCP apparently is not a superset of IPCP, this is bad,
but I'll investigate it separately.  This unbreaks
test/FrontendC/weak_constant.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85735 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert to filecheck.
Chris Lattner [Sun, 1 Nov 2009 19:22:20 +0000 (19:22 +0000)]
convert to filecheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85734 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove the other instance of the comment.
Duncan Sands [Sun, 1 Nov 2009 19:16:21 +0000 (19:16 +0000)]
Improve the other instance of the comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85733 91177308-0d34-0410-b5e6-96231b3b80d8