Commit Graph

130390 Commits

Author SHA1 Message Date
Simon Pilgrim
68566f9e5f [X86] Added TODO comment for target shuffle mask decoding of bitcasted masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 11:34:18 +00:00
Asaf Badouh
74bdb66c16 [X86] Remove unneeded variables
no functional change.
ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL).

Differential Revision: http://reviews.llvm.org/D18942

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266557 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 08:28:40 +00:00
Craig Topper
6b892ee1ab [AVX512] ISD::MUL v2i64/v4i64 should only be legal if DQI and VLX features are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 07:25:39 +00:00
Duncan P. N. Exon Smith
d9827cedf5 IR: Fix type-refs in testcase from r266548
There's a hole in the verifier right now: if a module has no compile
units, it never checks that all the string-based DITypeRefs get
resolved.  As a result, this testcase didn't fail the verifier, even
there were references to `!"has-uuid"` instead of `!"uuid"` (the former
was a composite type's 'name:' field, the latter its 'identifier:'
field).

I'm currently working on removing string-based type refs entirely, and
this testcase started failing (because the upgrade script can't resolve
the type refs).  Rather than fixing the (about-to-be-removed) hole in
the verifier, I'm just going to fix the test so that my upgrade script
handles it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266553 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 06:42:30 +00:00
Duncan P. N. Exon Smith
2b7fe3c50b IR: Use getRawScope() when verifying
Fix a couple of places in the Verifier that call `getScope()` instead of
`getRawScope()`.  Both DIDerivedType::getScope and
DICompositeType::getScope return a DITypeRef right now (which wraps a
Metadata*) so I don't think there's currently an observable bug.  I
found this because a future commit that will change them to cast to
DIScope*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 05:41:09 +00:00
Sanjoy Das
0fd5dc0990 Fix a typo in rL265762
I accidentally replaced `mayBeOverridden` with `!isInterposable`.
Remove the negation and add a test case that would've caught this.

Many thanks to Håkan Hjort for spotting this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266551 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 04:30:43 +00:00
Duncan P. N. Exon Smith
499c2d43d7 Revert "use range loop, try to make comments more meaningful; NFCI"
This reverts commit r266541 since it introduces a use-after-free:
  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266550 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 03:59:37 +00:00
Duncan P. N. Exon Smith
9bb5d5d42c IR: Use an explicit map for debug info type uniquing
Rather than relying on the structural equivalence of DICompositeType to
merge type definitions, use an explicit map on the LLVMContext that
LLParser and BitcodeReader consult when constructing new nodes.
Each non-forward-declaration DICompositeType with a non-empty
'identifier:' field is stored/loaded from the type map, and the first
definiton will "win".

This map is opt-in: clients that expect ODR types from different modules
to be merged must call LLVMContext::ensureDITypeMap.

  - Clients that just happen to load more than one Module in the same
    LLVMContext won't magically merge types.

  - Clients (like LTO) that want to continue to merge types based on ODR
    identifiers should opt-in immediately.

I have updated LTOCodeGenerator.cpp, the two "linking" spots in
gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to
set this.

With this in place, it will be straightforward to remove the DITypeRef
concept (i.e., referencing types by their 'identifier:' string rather
than pointing at them directly).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 03:58:21 +00:00
Duncan P. N. Exon Smith
12a8b1475d IR: Use ODR to unique DICompositeType members
Merge members that are describing the same member of the same ODR type,
even if other bits differ.  If the file or line differ, we don't care;
if anything else differs, it's an ODR violation (and we still don't
really care).

For DISubprogram declarations, this looks at the LinkageName and Scope.
For DW_TAG_member instances of DIDerivedType, this looks at the Name and
Scope.  In both cases, we know that the Scope follows ODR rules if it
has a non-empty identifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 02:30:20 +00:00
Craig Topper
9e15d9af12 [Target] Reduce size of the LoadExtActions array in TargetLoweringBase by half. Saving ~18K bytes from the array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 01:34:37 +00:00
Craig Topper
664e2c80b4 [Target] Remove checks for Simple VTs before calling routines that can handle Extended VTs too. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266546 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 01:34:35 +00:00
Craig Topper
bf8d6bcffc [Target] Fix an assertion that should have been updated when the code below it was changed in r251033.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 01:34:32 +00:00
Duncan P. N. Exon Smith
4460c98673 LangRef: Removed some outdated text about DIDerivedType
This text is also incorrect (much like r266540).  It looks like I missed
updating some of what I moved from SourceLevelDebugging.rst in r232566.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 00:45:00 +00:00
Duncan P. N. Exon Smith
36d852b3d6 Linker: Clarify test/Linker/type-unique-odr-a.ll, NFC
Split up the long RUN and clarify the CHECK lines:

  - Explicitly confirm there are no other subprograms inside of "A".

  - Remove checks for "bar" and "baz", which were just implicitly
    checking that there were no other subprograms inside of "A".

This prepares for adding a RUN line which links the two files in the
opposite direction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 00:26:17 +00:00
Duncan P. N. Exon Smith
44387cfe5f IR: Add a configuration point for MDNodeInfo::isEqual, NFC
This commit has no functionality change, but it adds a configuration
point for MDNodeInfo::isEqual to allow custom uniquing of subclasses of
MDNode, minimizing the diff of a follow-up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 23:42:04 +00:00
Sanjay Patel
3126dd7d52 use range loop, try to make comments more meaningful; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 23:26:16 +00:00
Duncan P. N. Exon Smith
2c71d39640 LangRef: Fix some bugs in debug info descriptions
Fix descriptions of DICompositeType and DIDerivedType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 22:46:47 +00:00
Duncan P. N. Exon Smith
d25d6b7783 IR: Remove extra blank line, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 22:26:04 +00:00
Duncan P. N. Exon Smith
9c9a101118 LTO: Use a common LibLTOCodeGenerator::init, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 22:25:36 +00:00
Duncan P. N. Exon Smith
fcbd2d6ed3 ValueMapper: Separate mapping of distinct and uniqued nodes (again)
Since the result of a mapped distinct node is known up front, it's more
efficient to map them separately from uniqued nodes.  This commit pulls
them out of the post-order traversal and stores them in a worklist to be
remapped at the top-level.

This is essentially reapplying r244181 ("ValueMapper: Rotate distinct
node remapping algorithm") to the new iterative algorithm from r265456
("ValueMapper: Rewrite Mapper::mapMetadata without recursion").

Now that the traversal logic only handles uniqued MDNodes, it's much
simpler to inline it all into MDNodeMapper::createPOT (I've killed the
MDNodeMapper::push and MDNodeMapper::tryToPop helpers and localized the
traversal worklist).

The resulting high-level algorithm for MDNodeMapper::map now looks like
this:

  - Distinct nodes are immediately mapped and added to
    MDNodeMapper::DistinctWorklist using MDNodeMapper::mapDistinctNode.

  - Uniqued nodes are mapped via MDNodeMapper::mapTopLevelUniquedNode,
    which traverses the transitive uniqued subgraph of a node to
    calculate uniqued node mappings in bulk.

      - This is a simplified version of MDNodeMapper::map from before
        this commit (originally r265456) that doesn't traverse through
        any distinct nodes.

      - Distinct nodes are added to MDNodeMapper::DistinctWorklist via
        MDNodeMapper::mapDistinctNode.

      - This uses MDNodeMapper::createPOT to fill a
        MDNodeMapper::UniquedGraph (a post-order traversal and side
        table), UniquedGraph::propagateChanges to track which uniqued
        nodes need to change, and MDNodeMapper::mapNodesInPOT to create
        the uniqued nodes.

      - Placeholders for forward references are now only needed when
        there's a uniquing cycle (a cycle of uniqued nodes unbroken by
        distinct nodes).  This is the key functionality change that
        we're reintroducing (from r244181).  As of r265456, a temporary
        forward reference might be needed for any cycle that involved
        uniqued nodes.

  - After mapping the first node appropriately, MDNodeMapper::map works
    through MDNodeMapper::DistinctWorklist.  For each distinct node, its
    operands are remapped with MDNodeMapper::mapDistinctNode and
    MDNodeMapper::mapTopLevelUniquedNode until all nodes have been
    mapped.

Sadly there's nothing observable I can test here; no real functionality
change, just a compile-time speedup from reduced malloc traffic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 21:44:08 +00:00
Duncan P. N. Exon Smith
5b389c0896 ValueMapper: Only put cyclic nodes into CyclicNodes, NFCI
As a minor fixup to r266258, only track nodes that needed a placeholder
in CyclicNodes in MDNodeMapper::mapUniquedNodes.  There should be no
observable functionality change, just some local memory savings because
CyclicNodes only needs to grow to accommodate nodes that are actually
involved in cycles.  (This was the original intent of r266258, or else
the vector would have been called "ChangedNodes".)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266536 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 21:09:53 +00:00
Simon Pilgrim
30836943b4 [X86][AVX] Add shuffle combine tests for MOVDDUP/MOVSHDUP/MOVSLDUP
128, 256 and 512 bit implementations (some not yet supported by combineX86ShuffleChain)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266535 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 20:30:59 +00:00
Craig Topper
3333cc9cd8 [X86] Use ternary operator to reduce code slightly. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266534 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 19:09:32 +00:00
Simon Pilgrim
0ba66e5c98 [X86][XOP] Added VPPERM constant mask decoding and target shuffle combining support
Added additional test that peeks through bitcast to v16i8 mask


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266533 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 17:52:07 +00:00
Vedant Kumar
bf62fd94a9 Add missing #include to fix build
Failing bot:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/23112/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 17:39:40 +00:00
Simon Pilgrim
66fb8aa44f [X86][XOP] More VPPERM shuffle mask decode tests
As requested by D18441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 16:37:21 +00:00
Simon Atanasyan
db4fbb66b3 ValueMapper: Fix unused var warning. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266529 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 11:49:40 +00:00
Mehdi Amini
492acdd450 Remove some unneeded headers and replace some headers with forward class declarations (NFC)
Differential Revision: http://reviews.llvm.org/D19154

Patch by Eugene Kosov <claprix@yandex.ru>

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266524 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 07:51:28 +00:00
Mehdi Amini
3ab0c4fc7e Add SVN version to libLLVMLTO
Summary: For Incremental LTO, we need to make sure that an old
cache entry is not used when incrementally re-linking with a new
libLTO.
Adding a global LLVM_REVISION in llvm-config.h would for to
rebuild/relink the world for every "git pull"/"svn update".
So instead only libLTO is made dependent on the VCS and will
be rebuilt (and the dependent binaries relinked, i.e. as of
today: libLTO.dylib and llvm-lto).

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D18987

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 07:33:14 +00:00
Mehdi Amini
29d66c4985 ThinLTO: Move the ODR resolution to be based purely on the summary.
This is a requirement for the cache handling in D18494

Differential Revision: http://reviews.llvm.org/D18908

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266519 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 07:02:16 +00:00
Mehdi Amini
eb79e6e85d ThinLTO: Make aliases explicit in the summary
To be able to work accurately on the reference graph when taking
decision about internalizing, promoting, renaming, etc. We need
to have the alias information explicit.

Differential Revision: http://reviews.llvm.org/D18836

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266517 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 06:56:44 +00:00
Alex Denisov
b677706043 Replace hardcoded comment at 'lit.site.cfg.in'
At the moment almost every lit.site.cfg.in contains two lines comment:

## Autogenerated by LLVM/Clang configuration.
# Do not edit!

The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from 
configure_lit_site_cfg with the note and some useful information.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 06:47:41 +00:00
Mehdi Amini
d7628daffa Do not modify a cl::opt programmatically, global mutable state is evil.
Found by TSAN on ThinLTO.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 04:58:30 +00:00
Duncan P. N. Exon Smith
0b11282f08 ValueMapper: Stop memoizing ConstantAsMetadata
Stop memoizing ConstantAsMetadata in ValueMapper::mapMetadata.  Now we
have to recompute it, but these metadata aren't particularly common, and
it restricts the lifetime of the Metadata map unnecessarily.

(The motivation is that I have a patch which uses a single Metadata map
for the lifetime of IRMover.  Mehdi profiled r266446 with the patch
applied and we saw a pretty big speedup in lib/Linker.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 03:39:44 +00:00
Davide Italiano
30f743e304 [DebugInfo] Correct the assertion introduced in r266509 + update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 03:23:48 +00:00
Duncan P. N. Exon Smith
1f03619959 Reapply "ValueMapper: Eliminate cross-file co-recursion, NFC"
This reverts commit r266507, reapplying r266503 (and r266505
"ValueMapper: Use API from r266503 in unit tests, NFC") completely
unchanged.

I reverted because of a bot failure here:
  http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16810/

However, looking more closely, the failure was from a host-compiler
crash (clang 3.7.1) when building:
  lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfAccelTable.cpp.o

I didn't modify that file, or anything it includes, with that commit.

The next build (which hadn't picked up my revert) got past it:
  http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16811/

I think this was just unfortunate timing.  I suppose the bot must be
flakey.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266510 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 02:29:55 +00:00
Davide Italiano
b5fd6b390c [DebugInfo] Reduce size of DILocalVariable from 40 to 32 bytes.
This significantly contributes to peak memory usage during a
LTO Release+DebugInfo build of clang. In my profile the peak usage
is around 164MB before this change and ~130MB after.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 02:27:56 +00:00
Matt Arsenault
d24550703e AMDGPU: Enable LocalStackSlotAllocation pass
This resolves more frame indexes early and folds
the immediate offsets into the scratch mubuf instructions.

This cleans up a lot of the mess that's currently emitted,
such as emitting add 0s and repeatedly initializing the same
register to 0 when spilling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 02:13:37 +00:00
Duncan P. N. Exon Smith
86a7a5ada2 Revert "ValueMapper: Eliminate cross-file co-recursion, NFC"
This reverts commit r266503, in case it's the root cause of this bot
failure:

  http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16810

I'm also reverting r266505 -- "ValueMapper: Use API from r266503 in unit
tests, NFC" -- since it's in the way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266507 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 02:05:33 +00:00
Matt Arsenault
992b34c001 AMDGPU: Use s_addk_i32 / s_mulk_i32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266506 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 01:46:49 +00:00
Duncan P. N. Exon Smith
90cac21151 ValueMapper: Use API from r266503 in unit tests, NFC
I'm not in a hurry to migrate all the users, but the unit tests at least
should use the new API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 01:40:24 +00:00
Duncan P. N. Exon Smith
d83a5e8fc6 ValueMapper: Eliminate cross-file co-recursion, NFC
Eliminate co-recursion of Mapper::mapValue through
ValueMaterializer::materializeInitFor, through a major redesign of the
ValueMapper.cpp interface.

  - Expose a ValueMapper class that controls the entry points to the
    mapping algorithms.
  - Change IRLinker to use ValueMapper directly, rather than
    llvm::RemapInstruction, llvm::MapValue, etc.
  - Use (e.g.) ValueMapper::scheduleMapGlobalInit to add mapping work to
    a worklist in ValueMapper instead of recursing.

There were two fairly major complications.

Firstly, IRLinker::linkAppendingVarProto incorporates an on-the-fly IR
ugprade that I had to split apart.  Long-term, this upgrade should be
done in the bitcode reader (and we should only accept the "new" form),
but for now I've just made it work and added a FIXME.  The hold-op is
that we need to deprecate C API that relies on this.

Secondly, IRLinker has special logic to correctly implement aliases with
comdats, and uses two ValueToValueMapTy instances and two
ValueMaterializers.  I supported this by allowing clients to register an
alternate mapping context, whose MCID can be passed in when scheduling
new work.

While out of scope for this commit, it should now be straightforward to
remove recursion from Mapper::mapValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 01:29:08 +00:00
Richard Smith
43ef70d524 Update and fix LLVM_ENABLE_MODULES:
1) We need to add this flag prior to adding any other, in case the user has
specified a -fmodule-cache-path= flag in their custom CXXFLAGS. Such a flag
causes -Werror builds to fail, and thus all config checks fail, until we add
the corresponding -fmodules flag. The modules selfhost bot does this, for
instance.

2) Delete module maps that were putting .cpp files into modules.

3) Enable -fmodules-local-submodule-visibility, to get proper module
visibility rules applied across submodules of the same module. Disable
-fmodules for C builds, since that flag is not available there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 00:48:58 +00:00
Richard Smith
d1d05a8bbb Add some missing #includes, found by C++ modules selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 00:42:37 +00:00
Duncan P. N. Exon Smith
fef9f1f667 Linker: Remove an unnecessary local variable in for loop, NFC
Reduces changes in a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 23:32:44 +00:00
Richard Smith
b337fbb4a1 Make this header include the header it depends on, rather than trying to include itself. Found by C++ modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266492 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 23:30:57 +00:00
Duncan P. N. Exon Smith
5e3b7aed44 ValueMapper: Hide Mapper::VM behind an accessor, NFC
Change Mapper::VM to a pointer and add a `getVM()` accessor for it.
While this has no functionality change, it minimizes the diff on an
upcoming patch that allows switching between instances of
ValueToValueMapTy on a single Mapper instance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 23:18:43 +00:00
Wei Mi
1f5a2c3f94 Don't skip splitSeparateComponents in eliminateDeadDefs for HoistSpillHelper::hoistAllSpills.
Because HoistSpillHelper::hoistAllSpills is called in postOptimization, before the
patch we didn't want LiveRangeEdit::eliminateDeadDefs to call splitSeparateComponents
and generate unassigned new vregs. However, skipping splitSeparateComponents will make
verify-machineinstrs unhappy, so I remove the early return, and use
HoistSpillHelper::LRE_DidCloneVirtReg to assign physreg/stackslot for those new vregs.

In addition, some code reorganization to make class HoistSpillHelper privately inheriting
from LiveRangeEdit::Delegate possible. This is to be consistent with class RAGreedy and
class RegisterCoalescer.

Differential Revision: http://reviews.llvm.org/D19142



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 23:16:44 +00:00
Easwaran Raman
a4f47922ff Add ProfileData to required_libraries
This should fix ppc64be build breakage due to r266477



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 23:08:52 +00:00
Evgeniy Stepanov
a1385500a7 [cfi] Support explicit sections for functions in cfi-icall.
Allow explicit section for indirectly called functions in cfi-icall.
Jumptables for functions in the same type class must be contiguous, so they
always go to the default text section.

Fixes PR25079.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 22:55:38 +00:00