NAKAMURA Takumi [Mon, 17 Sep 2012 22:34:56 +0000 (22:34 +0000)]
llvm/Target/TargetSubtargetInfo.h: Fix case in #include, s#llvm/Codegen/#llvm/CodeGen#.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164070
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 17 Sep 2012 22:28:55 +0000 (22:28 +0000)]
PGO: preserve branch-weight metadata when simplifying SwitchOnSelect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164068
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:26:34 +0000 (22:26 +0000)]
Don't use NULL as a fake keyword
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164067
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:19:12 +0000 (22:19 +0000)]
InitMCProcessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164066
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:19:08 +0000 (22:19 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164065
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:19:04 +0000 (22:19 +0000)]
comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164064
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:19:01 +0000 (22:19 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164063
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:58 +0000 (22:18 +0000)]
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164062
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:55 +0000 (22:18 +0000)]
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164061
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:50 +0000 (22:18 +0000)]
TableGen subtarget emitter. Format and emit data tables for the new machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164060
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:48 +0000 (22:18 +0000)]
TableGen subtarget emitter. Generate data tables for the new machine model.
Map the CodeGenSchedule object model onto data tables. The structure
of the data tables is defined in MC, so for convenience we include
MCSchedule.h. The alternative is maintaining a redundant copy of the
table structure definitions. Mapping the object model onto data tables
is sufficiently complicated that it should not be interleaved with
emitting source code. This avoids major problem with the backend for
itinerary generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164059
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:45 +0000 (22:18 +0000)]
TableGen subtarget emitter. Emit processor resources for the new machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164058
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 17 Sep 2012 22:18:43 +0000 (22:18 +0000)]
TableGen subtarget parser: Add getProcResourcesIdx().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164057
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Mon, 17 Sep 2012 22:04:23 +0000 (22:04 +0000)]
Add some cases to x86 OptimizeCompare to handle DEC and INC, too.
While we are setting the earlier def to true, also make it live.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164056
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 17 Sep 2012 21:30:40 +0000 (21:30 +0000)]
PGO: preserve branch-weight metadata when simplifying two branches with a common
destination in SimplifyCondBranchToCondBranch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164054
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 17 Sep 2012 20:02:42 +0000 (20:02 +0000)]
Make sure there is enough room for RA. getStackSize needs to be cleaned up but
we will do that when we implement the full save/restore.
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164051
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 17 Sep 2012 18:31:15 +0000 (18:31 +0000)]
Increase the static sizes of some SmallSets. finalizeBundle() is very frequently called for some backends, and growing into an std::set is overkill for these numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164044
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 17 Sep 2012 18:25:23 +0000 (18:25 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164043
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 17 Sep 2012 18:05:20 +0000 (18:05 +0000)]
Fix PR13859
- Preserve the original NOutVT during casting from vector to integer by
extracting vector elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164042
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 17 Sep 2012 18:00:53 +0000 (18:00 +0000)]
TableGen: Add initializer.
Keep GCC's warnings happy. It can't reason out that the state machine won't
ever hit the potentially uninitialized use in OPC_FilterValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164041
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 17 Sep 2012 17:57:05 +0000 (17:57 +0000)]
s/__llvm_gcov_flush/__gcov_flush/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164040
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 17 Sep 2012 16:46:22 +0000 (16:46 +0000)]
LLVM_ATTRIBUTE_USED forces emission of a function. To silence unused function warnings use LLVM_ATTRIBUTE_UNUSED.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164036
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 17 Sep 2012 16:42:36 +0000 (16:42 +0000)]
NewSROA: Provide a full set of operator< for ByteRanges.
MSVC8 won't compile lower_bound if one is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164035
91177308-0d34-0410-b5e6-
96231b3b80d8
Axel Naumann [Mon, 17 Sep 2012 14:20:57 +0000 (14:20 +0000)]
Fix a few vars that can end up being used without initialization.
The cases where no initialization happens should still be checked for logic flaws.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164032
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 17 Sep 2012 14:10:54 +0000 (14:10 +0000)]
Removed the VMLxForwarding feature for the Cortex-A15 target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164030
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 17 Sep 2012 14:08:37 +0000 (14:08 +0000)]
Add a MachinePostDominator pass
This is used in the AMDIL and R600 backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164029
91177308-0d34-0410-b5e6-
96231b3b80d8
Sid Manning [Mon, 17 Sep 2012 12:27:39 +0000 (12:27 +0000)]
Add Michael Spencer's iterator class for stepping through relocations. Add method that, given a symbol index, will return the symbol's data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164026
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 17 Sep 2012 10:21:55 +0000 (10:21 +0000)]
Disable the protection from escaped allocas in an attempt to find violating passes. This may break the buildbots. I plan to revert it in a few hours.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164024
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Sep 2012 07:16:40 +0000 (07:16 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164017
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Sep 2012 06:59:23 +0000 (06:59 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164016
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Sep 2012 06:43:55 +0000 (06:43 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164015
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Sep 2012 06:31:17 +0000 (06:31 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164014
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Sep 2012 06:05:39 +0000 (06:05 +0000)]
Remove a couple unused fields. Not detected by Wunused-private-field because of unimplemented copy constructor and copy assignment operator that make the class look incomplete. Upcoming patch will mark them deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164013
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 17 Sep 2012 04:43:39 +0000 (04:43 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164012
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 21:56:23 +0000 (21:56 +0000)]
Add include of Compiler.h to fix build bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164009
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 21:50:09 +0000 (21:50 +0000)]
Add includes of Compiler.h to fix build bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164008
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 21:43:09 +0000 (21:43 +0000)]
Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164007
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 21:37:56 +0000 (21:37 +0000)]
Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 20:53:30 +0000 (20:53 +0000)]
Add LLVM_OVERRIDE and LLVM_FINAL C++11 compatibility macros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164005
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 16 Sep 2012 19:39:50 +0000 (19:39 +0000)]
Refactor the SROA visitors for partitioning an alloca and building
partition use lists a bit. No functionality changed.
These visitors are actually visiting a tuple of a Use and an offset into
the alloca. However, we use the InstVisitor to handle the dispatch over
the users, and so the Use and Offset are stored in class member
variables and set just before each call to visit(). This is fairly
awkward and makes the functions a bit harder to read, but its the only
real option we have until InstVisitor can be rewritten to use variadic
templates.
However, this pattern shouldn't be followed on the helper member
functions where there is no interface constraint from the visitor. We
already were passing the instruction as a normal parameter rather than
use the Use to get at it, start passing the offset as well. This will
become more important in subsequent patches as the offset will in some
cases change while visiting a single instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164003
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 18:25:36 +0000 (18:25 +0000)]
Add 'virtual' keywoards to output file for overridden functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164002
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 18:10:23 +0000 (18:10 +0000)]
Change unsigned to uint32_t to match base class declaration and other targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164001
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 16:48:25 +0000 (16:48 +0000)]
Fix bad comment. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164000
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 16:35:22 +0000 (16:35 +0000)]
Add 'virtual' keywoards to output file for overridden functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163999
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 16 Sep 2012 07:58:47 +0000 (07:58 +0000)]
Fix the testcase to work on all platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163997
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 07:39:55 +0000 (07:39 +0000)]
Add explicit virtual keywords for methods that override base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163996
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 16 Sep 2012 07:39:07 +0000 (07:39 +0000)]
The PMOVZXWD family of functions had patterns extends narrow vector types to wide vector types.
It had patterns for zext-loading and extending. This commit adds patterns for loading a wide type, performing a bitcast,
and extending. This is an odd pattern, but it is commonly used when writing code with intrinsics.
rdar://
11897677
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163995
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sun, 16 Sep 2012 05:55:04 +0000 (05:55 +0000)]
Guard fields by NDEBUG until they get used in the release build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163993
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 03:00:03 +0000 (03:00 +0000)]
Tidy up formatting of some elses on a separate line from preceding bracing. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163992
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 16 Sep 2012 02:15:36 +0000 (02:15 +0000)]
Add alternative coalescing algorithm under a flag.
The live range of an SSA value forms a sub-tree of the dominator tree.
That means the live ranges of two values overlap if and only if the def
of one value lies within the live range of the other.
This can be used to simplify the interference checking a bit: Visit each
def in the two registers about to be joined. Check for interference
against the value that is live in the other register at the def point
only. It is not necessary to scan the set of overlapping live ranges,
this interference check can be done while computing the value mapping
required for the final live range join.
The new algorithm is prepared to handle more complicated conflict
resolution - We can allow overlapping live ranges with different values
as long as the differing lanes are undef or unused in the other
register.
The implementation in this patch doesn't do that yet, it creates code
that is nearly identical to the old algorithm's, except:
- The new stripCopies() function sees through multiple copies while
the old RegistersDefinedFromSameValue() only can handle one.
- There are a few rare cases where the new algorithm can erase an
IMPLICIT_DEF instuction that RegistersDefinedFromSameValue() couldn't
handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163991
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 16 Sep 2012 02:15:33 +0000 (02:15 +0000)]
Fix problem when using LiveRangeQuery with block entries.
A value that is live in to a basic block should be returned by valueIn()
in LiveRangeQuery(getMBBStartIdx(MBB)), unless it is a PHI-def which
should be returned by valueDefined() instead.
Current code isn't using this functionality. Future code will.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163990
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 01:20:35 +0000 (01:20 +0000)]
Tidy up trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163988
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Sep 2012 01:18:51 +0000 (01:18 +0000)]
Remove unneeded header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163987
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 15 Sep 2012 20:22:05 +0000 (20:22 +0000)]
Fix Doxygen issues: wrap code examples in \code and use \p to refer to
parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163984
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 18:45:38 +0000 (18:45 +0000)]
Fix includes of llvm files that used angle brackets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163979
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 18:41:37 +0000 (18:41 +0000)]
Fix a couple include directives that used angle brackets for llvm files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163978
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 17:09:36 +0000 (17:09 +0000)]
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163974
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 17:08:51 +0000 (17:08 +0000)]
Remove unused private fields to silence -Wunused-private-field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163973
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 15 Sep 2012 16:32:11 +0000 (16:32 +0000)]
Don't depend on kill flags in removeCopyByCommutingDef().
Kill flags are removed more and more aggressively during the register
allocation passes, it is better to get information from LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163972
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 15 Sep 2012 16:29:49 +0000 (16:29 +0000)]
Make LiveRangeQuery work for PHIDefs as well.
If a PHI value happens to be live out from the layout predecessor of its
def block, the def slot index will be in the middle of the segment:
%vreg11 = [192r,240B:0)[352r,416B:2)[416B,496r:1) 0@192r 1@480B-phi %2@352r
A LiveRangeQuery for 480 should return NULL from valueIn() since the
PHI value is defined at the block entry, not live in to the block.
No test case, future code depends on this functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163971
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 16:23:52 +0000 (16:23 +0000)]
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163970
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 16:22:27 +0000 (16:22 +0000)]
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163969
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 15 Sep 2012 15:11:10 +0000 (15:11 +0000)]
Disable new sroa now that all buildbots have tested it.
What we have so far:
- Some clang test failures (these were known already)
- Perf results are mixed, some big regressions
http://llvm.org/perf/db_default/v4/nts/3844
http://llvm.org/perf/db_default/v4/nts/3845
bullet suffers a lot. matmul is interesting: slower scalar code, faster with -vectorize.
- Some dragonegg selfhost bots crash in SROA during selfhost now
http://lab.llvm.org:8011/builders/dragonegg-x86_64-linux-gcc-4.6-self-host-checks/builds/1632
http://lab.llvm.org:8011/builders/dragonegg-x86_64-linux-gcc-4.5-self-host/builds/1891
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163968
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 15 Sep 2012 12:44:27 +0000 (12:44 +0000)]
X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math.
This was only an issue if sse is disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 15 Sep 2012 11:43:14 +0000 (11:43 +0000)]
Port the SSAUpdater-based promotion logic from the old SROA pass to the
new one, and add support for running the new pass in that mode and in
that slot of the pass manager. With this the new pass can completely
replace the old one within the pipeline.
The strategy for enabling or disabling the SSAUpdater logic is to do it
by making the requirement of the domtree analysis optional. By default,
it is required and we get the standard mem2reg approach. This is usually
the desired strategy when run in stand-alone situations. Within the
CGSCC pass manager, we disable requiring of the domtree analysis and
consequentially trigger fallback to the SSAUpdater promotion.
In theory this would allow the pass to re-use a domtree if one happened
to be available even when run in a mode that doesn't require it. In
practice, it lets us have a single pass rather than two which was
simpler for me to wrap my head around.
There is a hidden flag to force the use of the SSAUpdater code path for
the purpose of testing. The primary testing strategy is just to run the
existing tests through that path. One notable difference is that it has
custom code to handle lifetime markers, and one of the tests has been
enhanced to exercise that code.
This has survived a bootstrap and the test suite without serious
correctness issues, however my run of the test suite produced *very*
alarming performance numbers. I don't entirely understand or trust them
though, so more investigation is on-going.
To aid my understanding of the performance impact of the new SROA now
that it runs throughout the optimization pipeline, I'm enabling it by
default in this commit, and will disable it again once the LNT bots have
picked up one iteration with it. I want to get those bots (which are
much more stable) to evaluate the impact of the change before I jump to
any conclusions.
NOTE: Several Clang tests will fail because they run -O3 and check the
result's order of output. They'll go back to passing once I disable it
again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163965
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 15 Sep 2012 01:52:08 +0000 (01:52 +0000)]
Remove aligned/unaligned load/store fragments defined in MipsInstrInfo.td and
use load/store fragments defined in TargetSelectionDAG.td in place of them.
Unaligned loads/stores are either expanded or lowered to target-specific nodes,
so instruction selection should see only aligned load/store nodes.
No changes in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163960
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Sep 2012 01:22:42 +0000 (01:22 +0000)]
Revert r163878 as it breaks on targets with alternate register names. Such targets do not exist in the main tree so this was not noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163959
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 15 Sep 2012 01:02:03 +0000 (01:02 +0000)]
Handled unaligned load/stores properly in Mips16
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163956
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 15 Sep 2012 00:39:57 +0000 (00:39 +0000)]
PGO: preserve branch-weight metadata when simplifying two branches with a common
destination.
Updated previous implementation to fix a case not covered:
// PBI: br i1 %x, TrueDest, BB
// BI: br i1 %y, TrueDest, FalseDest
The other case was handled correctly.
// PBI: br i1 %x, BB, FalseDest
// BI: br i1 %y, TrueDest, FalseDest
Also tried to use 64-bit arithmetic instead of APInt with scale to simplify the
computation. Let me know if you have other opinions about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163954
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Sep 2012 00:20:02 +0000 (00:20 +0000)]
TableGen subtarget parser. Handle new machine model.
Collect processor resources from the subtarget defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163953
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Sep 2012 00:19:59 +0000 (00:19 +0000)]
TableGen subtarget parser. Handle new machine model.
Infer SchedClasses from variants defined by the target or subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163952
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Sep 2012 00:19:57 +0000 (00:19 +0000)]
TableGen subtarget parser. Handle new machine model.
Collect SchedClasses and SchedRW types from the subtarget defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163951
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 Sep 2012 23:36:56 +0000 (23:36 +0000)]
cmake: Fix file path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163950
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 Sep 2012 23:15:56 +0000 (23:15 +0000)]
formatted_raw_ostream: Fix a serious bug in tell().
- The current_pos function is supposed to return all the written bytes, not the
current position of the underlying stream.
- This caused tell() to be broken whenever the underlying stream had buffered
content.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163948
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 14 Sep 2012 23:05:52 +0000 (23:05 +0000)]
Some small reorganization to get read for Attributes overhaul.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163947
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 14 Sep 2012 22:35:49 +0000 (22:35 +0000)]
Remove comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163945
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 14 Sep 2012 22:26:11 +0000 (22:26 +0000)]
Fix up erroneous alignas usage while making this portable to GCC 4.7
Review by Chandler Carruth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163944
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 14 Sep 2012 21:53:06 +0000 (21:53 +0000)]
PGO: preserve branch-weight metadata when simplifying a switch with a single
case to a conditional branch and when removing dead cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163942
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Sep 2012 21:25:34 +0000 (21:25 +0000)]
Stylistic and 80-col fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163940
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 20:27:25 +0000 (20:27 +0000)]
comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163935
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 20:26:46 +0000 (20:26 +0000)]
TargetSchedModel interface. To be implemented...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163934
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 20:26:41 +0000 (20:26 +0000)]
Define MC data tables for the new scheduling machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163933
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 20:26:39 +0000 (20:26 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163932
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Rosenberg [Fri, 14 Sep 2012 19:19:57 +0000 (19:19 +0000)]
Review feedback from Duncan Sands. Alphabetize includes and simplify
lit config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163928
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 14 Sep 2012 19:05:19 +0000 (19:05 +0000)]
Try to fix the bots by detecting inconsistant branch-weight metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163926
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 18:48:46 +0000 (18:48 +0000)]
Implement getNumLDMAddresses and expose through ARMBaseInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163922
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 18:31:58 +0000 (18:31 +0000)]
Cortex-A9 instruction-level scheduling machine model.
This models the A9 processor at the level of instruction operands, as
opposed to the itinerary, which models each operation at the level of
pipeline stages.
The two primary motivations are:
1) Allow MachineScheduler to model A9 as an out-of-order processor. It
can now distinguish between hazards that force interlocking vs.
buffered resources.
2) Reduce long-term maintenance by allowing the itinerary and target
hooks to eventually be removed. Note that almost all of the complexity
in the new model exists to model instruction variants, which the
itinerary cannot handle. Instead the scheduler previously relied on
processor-specific target hooks which are incomplete and buggy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163921
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 14 Sep 2012 17:29:56 +0000 (17:29 +0000)]
PGO: preserve branch-weight metadata when merging two switches where
the default target of the first switch is not the basic block the second switch
is in (PredDefault != BB).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163916
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 14 Sep 2012 17:22:42 +0000 (17:22 +0000)]
misched: add a hook for custom DAG postprocessing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163915
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Fri, 14 Sep 2012 15:36:50 +0000 (15:36 +0000)]
Add in comments that explain what the indexing and the size of the arrays is about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163904
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergei Larin [Fri, 14 Sep 2012 15:07:59 +0000 (15:07 +0000)]
DAG post-process for Hexagon MI scheduler
This patch introduces a possibility for Hexagon MI scheduler
to perform some target specific post- processing on the scheduling
DAG prior to scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163903
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 14 Sep 2012 14:57:36 +0000 (14:57 +0000)]
Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
with the rest of the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163902
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Sep 2012 13:08:09 +0000 (13:08 +0000)]
SROA: Silence unused variable warnings in Release builds.
The NDEBUG hack is ugly, but I see no better solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163900
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Sep 2012 12:19:58 +0000 (12:19 +0000)]
Remove redundant private field.
clang warned about this being unused in Release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163899
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 11:08:31 +0000 (11:08 +0000)]
Rework the computation of a sub-structure natural type. There were
pointless checks in here, bad asserts, and just confusing code. I've
also added a bit more to the comment to clarify what this function is
really trying to do as it was not obvious to Duncan when studying it.
Thanks to Duncan for helping me dig through the issue.
No real functionality changed here in practical cases, and certainly no
test case. This is just cleanup spotted by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163897
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 10:30:44 +0000 (10:30 +0000)]
Rely on the recursive check for pointer types rather than adding an
explicit check before recursing. A simplification requested by Duncan
during review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163896
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 10:30:42 +0000 (10:30 +0000)]
Be a bit more aggressive in bailing out of this routine. Spotted by
inspection by Duncan during review. My suspicion is that we would still
have returned 0 anyways in this case, but doing it sooner is better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163895
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 10:30:40 +0000 (10:30 +0000)]
Add some comments clarifying that the GEP analysis for vector GEPs is
deeply suspicious and likely to go away eventually. Also fix a bogus
comment about one of the checks in the vector GEP analysis. Based on
review from Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163894
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 10:26:38 +0000 (10:26 +0000)]
Move an instance variable to a local variable based on review by Duncan.
Originally I had anticipated needing to thread this through more bits of
the SROA pass itself, but that ended up not happening. In the end, this
is a much simpler way to manange the variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163893
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 14 Sep 2012 10:26:36 +0000 (10:26 +0000)]
Add a comment about debug intrinsics that I *really* don't want to
forget from Duncan's review as a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163892
91177308-0d34-0410-b5e6-
96231b3b80d8