]> granicus.if.org Git - llvm/log
llvm
9 years ago[RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC
Sanjoy Das [Sun, 26 Jun 2016 04:55:19 +0000 (04:55 +0000)]
[RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC

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

9 years ago[RSForGC] Bring analyzeParsePointLiveness up to code; NFC
Sanjoy Das [Sun, 26 Jun 2016 04:55:17 +0000 (04:55 +0000)]
[RSForGC] Bring analyzeParsePointLiveness up to code; NFC

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

9 years ago[RSForGC] Bring meetBDVStateImpl up to code; NFC
Sanjoy Das [Sun, 26 Jun 2016 04:55:13 +0000 (04:55 +0000)]
[RSForGC] Bring meetBDVStateImpl up to code; NFC

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

9 years ago[RSForGC] Get rid of the unnecessary MeetBDVStates struct; NFC
Sanjoy Das [Sun, 26 Jun 2016 04:55:10 +0000 (04:55 +0000)]
[RSForGC] Get rid of the unnecessary MeetBDVStates struct; NFC

All of its implementation is in just one function.

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

9 years ago[RSForGC] Bring findBasePointer up to code; NFC
Sanjoy Das [Sun, 26 Jun 2016 04:55:05 +0000 (04:55 +0000)]
[RSForGC] Bring findBasePointer up to code; NFC

Name-casing and minor style changes to bring the function up to the LLVM
coding style.

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

9 years ago[Object, COFF] An import data directory might not consist soley of imports
David Majnemer [Sun, 26 Jun 2016 04:36:32 +0000 (04:36 +0000)]
[Object, COFF] An import data directory might not consist soley of imports

The last import is the penultimate entry, the last entry is nulled out.
Data beyond the null entry should not be considered to hold import
entries.

This fixes PR28302.

N.B.  I am working on a reduced testcase, the one in PR28302 is too
large.

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

9 years ago[llvm-cov] Simplify the way expansion views are rendered (NFC)
Vedant Kumar [Sun, 26 Jun 2016 02:45:13 +0000 (02:45 +0000)]
[llvm-cov] Simplify the way expansion views are rendered (NFC)

If a sub-view has already been rendered, it's helpful to re-render the
expansion site before rendering the next expansion view. Make this fact
explicit in the rendering interface, instead of hiding it behind an
awkward Optional<LineRef> parameter.

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

9 years ago[X86] Convert ==/!= comparisons with -1 for checking undef in shuffle lowering to...
Craig Topper [Sat, 25 Jun 2016 19:05:29 +0000 (19:05 +0000)]
[X86] Convert ==/!= comparisons with -1 for checking undef in shuffle lowering to comparisons of <0 or >=0. While there do the same for other kinds of index checks that can just check for greater than 0. No functional change intended.

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

9 years ago[X86] Pull similar bitcasts on different paths to earlier shared point. NFC
Craig Topper [Sat, 25 Jun 2016 19:05:23 +0000 (19:05 +0000)]
[X86] Pull similar bitcasts on different paths to earlier shared point. NFC

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

9 years agoAMDGPU/R600: Fix GlobalValue regressions.
Jan Vesely [Sat, 25 Jun 2016 18:24:16 +0000 (18:24 +0000)]
AMDGPU/R600: Fix GlobalValue regressions.

Don't cast GV expression to MCSymbolRefExpr. r272705 changed GV to binary
expressions by including offset even if the offset it 0
(we haven't hit this sooner since tested workloads don't include static offsets)
We don't really care about the type of expression, so set it directly.
Fixes: r272705
Consider section relative relocations. Since all const as data is in one boffer section relative is equivalent to abs32.
Fixes: r273166
Differential Revision: http://reviews.llvm.org/D21633

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

9 years agoupdate tests to use FileCheck
Sanjay Patel [Sat, 25 Jun 2016 17:39:10 +0000 (17:39 +0000)]
update tests to use FileCheck

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

9 years ago[cmake] Port the llvm-config option --build-mode to LLVMConfig.cmake via the variable...
Michael Gottesman [Sat, 25 Jun 2016 11:31:50 +0000 (11:31 +0000)]
[cmake] Port the llvm-config option --build-mode to LLVMConfig.cmake via the variable LLVM_BUILD_TYPE.

This is just a small step in the direction of making LLVMConfig.cmake a complete
replacement for llvm-config.

For those unfamiliar, llvm-config --build-mode prints out CMAKE_BUILD_TYPE. Thus
as one can imagine, LLVM_BUILD_TYPE is @CMAKE_BUILD_TYPE@.

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

9 years agoReapply r273664 with workaround for MSVC
Hubert Tong [Sat, 25 Jun 2016 11:23:59 +0000 (11:23 +0000)]
Reapply r273664 with workaround for MSVC

Reviewers: rsmith, faisalv, aaron.ballman

Subscribers: llvm-commits, cfe-commits, nwilson

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

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

9 years agoJust a small cleanup
David Majnemer [Sat, 25 Jun 2016 08:34:38 +0000 (08:34 +0000)]
Just a small cleanup

No functional change is intended

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

9 years agoRevert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"
David Majnemer [Sat, 25 Jun 2016 08:19:55 +0000 (08:19 +0000)]
Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"

This reverts commit r273778, it seems to break UBSan :/

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

9 years ago[SimplifyCFG] Stop inserting calls to llvm.trap for UB
David Majnemer [Sat, 25 Jun 2016 08:04:19 +0000 (08:04 +0000)]
[SimplifyCFG] Stop inserting calls to llvm.trap for UB

SimplifyCFG had logic to insert calls to llvm.trap for two very
particular IR patterns: stores and invokes of undef/null.

While InstCombine canonicalizes certain undefined behavior IR patterns
to stores of undef, phase ordering means that this cannot be relied upon
in general.

There are much better tools than llvm.trap: UBSan and ASan.

N.B. I could be argued into reverting this change if a clear argument as
to why it is important that we synthesize llvm.trap for stores, I'd be
hard pressed to see why it'd be useful for invokes...

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

9 years ago[InstSimplify] Replace calls to null with undef
David Majnemer [Sat, 25 Jun 2016 07:37:30 +0000 (07:37 +0000)]
[InstSimplify] Replace calls to null with undef

Calling null is undefined behavior, we can simplify the resulting value
to undef.

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

9 years ago[SimplifyCFG] Replace calls to null/undef with unreachable
David Majnemer [Sat, 25 Jun 2016 07:37:27 +0000 (07:37 +0000)]
[SimplifyCFG] Replace calls to null/undef with unreachable

Calling null is undefined behavior, a call to undef can be trivially
treated as a call to null.

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

9 years agoFix a typo in FindAvailableLoadedValue, introduced by r273734. [-Wdocumentation]
NAKAMURA Takumi [Sat, 25 Jun 2016 06:03:14 +0000 (06:03 +0000)]
Fix a typo in FindAvailableLoadedValue, introduced by r273734. [-Wdocumentation]

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

9 years ago[llvm-cov] Make an API more consistent, NFC
Vedant Kumar [Sat, 25 Jun 2016 05:48:59 +0000 (05:48 +0000)]
[llvm-cov] Make an API more consistent, NFC

Make renderExpansionView() look a bit more like renderLine(), and
clarify its doxygen comment.

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

9 years ago[llvm-cov] Flesh out some doxygen comments, NFC
Vedant Kumar [Sat, 25 Jun 2016 05:48:54 +0000 (05:48 +0000)]
[llvm-cov] Flesh out some doxygen comments, NFC

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

9 years agoTry to fix the MSVC build
Vedant Kumar [Sat, 25 Jun 2016 03:27:29 +0000 (03:27 +0000)]
Try to fix the MSVC build

There's some kind of issue with using "constexpr unsigned" in an
anonymous namespace.

http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/13395

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

9 years ago[AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in the kerne...
Konstantin Zhuravlyov [Sat, 25 Jun 2016 03:11:28 +0000 (03:11 +0000)]
[AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in the kernel code header

Debugger prologue is emitted if -mattr=+amdgpu-debugger-emit-prologue.

Debugger prologue writes work group IDs and work item IDs to scratch memory at fixed location in the following format:
  - offset 0: work group ID x
  - offset 4: work group ID y
  - offset 8: work group ID z
  - offset 16: work item ID x
  - offset 20: work item ID y
  - offset 24: work item ID z

Set
  - amd_kernel_code_t::debug_wavefront_private_segment_offset_sgpr to scratch wave offset reg
  - amd_kernel_code_t::debug_private_segment_buffer_sgpr to scratch rsrc reg
  - amd_kernel_code_t::is_debug_supported to true if all debugger features are enabled

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

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

9 years agollvm-ar: add some tests for llvm-ar default selection
Saleem Abdulrasool [Sat, 25 Jun 2016 03:05:56 +0000 (03:05 +0000)]
llvm-ar: add some tests for llvm-ar default selection

This adds some tests for the smarter llvm-ar selection mode as well as some
additional tests as per Rafael's post commit review comments.

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

9 years ago[llvm-cov] Separate presentation logic from formatting logic, NFC
Vedant Kumar [Sat, 25 Jun 2016 02:58:30 +0000 (02:58 +0000)]
[llvm-cov] Separate presentation logic from formatting logic, NFC

This makes it easier to add renderers for new kinds of output formats.

- Define and document a pure-virtual coverage rendering interface.
- Move the text-based rendering logic into its a new file.
- Re-work the API to better reflect the presentation/formatting split.

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

9 years agoMachineScheduler: Remember top/bottom choice in bidirectional scheduling
Matthias Braun [Sat, 25 Jun 2016 02:03:36 +0000 (02:03 +0000)]
MachineScheduler: Remember top/bottom choice in bidirectional scheduling

Remember the last choice for the top/bottom scheduling boundary in
bidirectional scheduling mode. The top choice should not change if we
schedule at the bottom and vice versa.

This allows us to improve compiletime: We only recalculate the best pick
for one border and re-use the cached top-pick from the other border.

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

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

9 years agoAMDGPU/SI: Make sure not to fold offsets into local address space globals
Tom Stellard [Sat, 25 Jun 2016 01:59:16 +0000 (01:59 +0000)]
AMDGPU/SI: Make sure not to fold offsets into local address space globals

Summary:
Offset folding only works if you are emitting relocations, and we don't
emit relocations for local address space globals.

Reviewers: arsenm, nhaustov

Subscribers: arsenm, llvm-commits, kzhuravl

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

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

9 years ago[PlaceSafepoints] Don't call undef in test case; NFC
Sanjoy Das [Sat, 25 Jun 2016 01:40:54 +0000 (01:40 +0000)]
[PlaceSafepoints] Don't call undef in test case; NFC

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

9 years ago[LoopUnswitch] Avoid exponential behavior
Sanjoy Das [Sat, 25 Jun 2016 01:14:19 +0000 (01:14 +0000)]
[LoopUnswitch] Avoid exponential behavior

Summary: (No semantic change intended).

Reviewers: majnemer, bogner, mzolotukhin

Subscribers: mcrosier, llvm-commits, mzolotukhin

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

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

9 years agoThe absence of noreturn doesn't ensure mayReturn
David Majnemer [Sat, 25 Jun 2016 00:55:12 +0000 (00:55 +0000)]
The absence of noreturn doesn't ensure mayReturn

There are two separate issues:
- LLVM doesn't consider infinite loops to be side effects: we happily
  hoist/sink above/below loops whose bounds are unknown.
- The absence of the noreturn attribute is insufficient for us to know
  if a function will definitely return.  Relying on noreturn in the
  middle-end for any property is an accident waiting to happen.

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

9 years agoIt isn't meaningful for a transform to preserve another transform. NFC.
Michael Kuperstein [Sat, 25 Jun 2016 00:47:21 +0000 (00:47 +0000)]
It isn't meaningful for a transform to preserve another transform. NFC.

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

9 years agoIR: Introduce llvm.type.checked.load intrinsic.
Peter Collingbourne [Sat, 25 Jun 2016 00:23:04 +0000 (00:23 +0000)]
IR: Introduce llvm.type.checked.load intrinsic.

This intrinsic safely loads a function pointer from a virtual table pointer
using type metadata. This intrinsic is used to implement control flow integrity
in conjunction with virtual call optimization. The virtual call optimization
pass will optimize away llvm.type.checked.load intrinsics associated with
devirtualized calls, thereby removing the type check in cases where it is
not needed to enforce the control flow integrity constraint.

This patch also introduces the capability to copy type metadata between
global variables, and teaches the virtual call optimization pass to do so.

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

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

9 years agoMachineScheduler: Fully compare top/bottom candidates
Matthias Braun [Sat, 25 Jun 2016 00:23:00 +0000 (00:23 +0000)]
MachineScheduler: Fully compare top/bottom candidates

In bidirectional scheduling this gives more stable results than just
comparing the "reason" fields of the top/bottom node because the reason
field may be higher depending on what other nodes are in the queue.

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

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

9 years agoReinstate r273711
David Majnemer [Sat, 25 Jun 2016 00:04:10 +0000 (00:04 +0000)]
Reinstate r273711

r273711 was reverted by r273743.  The inliner needs to know about any
call sites in the inlined function.  These were obscured if we replaced
a call to undef with an undef but kept the call around.

This fixes PR28298.

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

9 years agoSilence a -Wsign-compare warning
David Majnemer [Sat, 25 Jun 2016 00:04:06 +0000 (00:04 +0000)]
Silence a -Wsign-compare warning

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

9 years agoAMDGPU: Define a schedule class for COPY.
Matthias Braun [Fri, 24 Jun 2016 23:52:11 +0000 (23:52 +0000)]
AMDGPU: Define a schedule class for COPY.

COPY was lacking a scheduling class, define it to avoid regressions in
the upcoming change to the bidirectional MachineScheduler. Approved by
tstellar on IRC.

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

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

9 years ago[PM] Port float2int to the new pass manager
Michael Kuperstein [Fri, 24 Jun 2016 23:32:02 +0000 (23:32 +0000)]
[PM] Port float2int to the new pass manager

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

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

9 years agoHookup ProfileSummary with SampleProfilerLoader
Dehao Chen [Fri, 24 Jun 2016 22:57:06 +0000 (22:57 +0000)]
Hookup ProfileSummary with SampleProfilerLoader

Summary: Set ProfileSummary in SampleProfilerLoader.

Reviewers: davidxl, eraman

Subscribers: llvm-commits

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

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

9 years ago[MBP] show function name in debug dump
Xinliang David Li [Fri, 24 Jun 2016 22:54:21 +0000 (22:54 +0000)]
[MBP] show function name in debug dump

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

9 years agoRevert r273711, it caused PR28298.
Nico Weber [Fri, 24 Jun 2016 22:52:39 +0000 (22:52 +0000)]
Revert r273711, it caused PR28298.

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

9 years agoFix lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp for r273701
Kevin Enderby [Fri, 24 Jun 2016 22:38:30 +0000 (22:38 +0000)]
Fix lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp for r273701
and the change to libObject’s getSymbolAddress() to Expected<...> .

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

9 years agoSimplify. NFC.
Rafael Espindola [Fri, 24 Jun 2016 22:19:54 +0000 (22:19 +0000)]
Simplify. NFC.

Also delete out of date comment. This code was always returning .data
since r253436.

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

9 years agoFix unused variable warning in -asserts builds.
Peter Collingbourne [Fri, 24 Jun 2016 21:37:11 +0000 (21:37 +0000)]
Fix unused variable warning in -asserts builds.

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

9 years agoFix the type signature of DwarfExpression::Add.*Constant to support values >32 bits.
Adrian Prantl [Fri, 24 Jun 2016 21:35:09 +0000 (21:35 +0000)]
Fix the type signature of DwarfExpression::Add.*Constant to support values >32 bits.
This fixes an embarrassing bug when emitting .debug_loc entries for 64-bit+ constants,
which were previously silently truncated to 32 bits.

<rdar://problem/26843232>

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

9 years agoFix documentation for FindAvailableLoadedValue.
Eli Friedman [Fri, 24 Jun 2016 21:32:15 +0000 (21:32 +0000)]
Fix documentation for FindAvailableLoadedValue.

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

9 years ago[Hexagon] Simplify (+fix) instruction selection for indexed loads/stores
Krzysztof Parzyszek [Fri, 24 Jun 2016 21:27:17 +0000 (21:27 +0000)]
[Hexagon] Simplify (+fix) instruction selection for indexed loads/stores

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

9 years ago[IndVarSimplify] Run clang-format over some oddly formatted bits
Sanjoy Das [Fri, 24 Jun 2016 21:23:32 +0000 (21:23 +0000)]
[IndVarSimplify] Run clang-format over some oddly formatted bits

NFC (whitespace only change)

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

9 years agoIR: New representation for CFI and virtual call optimization pass metadata.
Peter Collingbourne [Fri, 24 Jun 2016 21:21:32 +0000 (21:21 +0000)]
IR: New representation for CFI and virtual call optimization pass metadata.

The bitset metadata currently used in LLVM has a few problems:

1. It has the wrong name. The name "bitset" refers to an implementation
   detail of one use of the metadata (i.e. its original use case, CFI).
   This makes it harder to understand, as the name makes no sense in the
   context of virtual call optimization.

2. It is represented using a global named metadata node, rather than
   being directly associated with a global. This makes it harder to
   manipulate the metadata when rebuilding global variables, summarise it
   as part of ThinLTO and drop unused metadata when associated globals are
   dropped. For this reason, CFI does not currently work correctly when
   both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable
   globals, and fails to associate metadata with the rebuilt globals. As I
   understand it, the same problem could also affect ASan, which rebuilds
   globals with a red zone.

This patch solves both of those problems in the following way:

1. Rename the metadata to "type metadata". This new name reflects how
   the metadata is currently being used (i.e. to represent type information
   for CFI and vtable opt). The new name is reflected in the name for the
   associated intrinsic (llvm.type.test) and pass (LowerTypeTests).

2. Attach metadata directly to the globals that it pertains to, rather
   than using the "llvm.bitsets" global metadata node as we are doing now.
   This is done using the newly introduced capability to attach
   metadata to global variables (r271348 and r271358).

See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html

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

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

9 years ago[APInt] Don't shift into the sign bit
David Majnemer [Fri, 24 Jun 2016 21:15:36 +0000 (21:15 +0000)]
[APInt] Don't shift into the sign bit

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

9 years agoAdd support for musl-libc on ARM Linux.
Rafael Espindola [Fri, 24 Jun 2016 21:14:33 +0000 (21:14 +0000)]
Add support for musl-libc on ARM Linux.

Patch by Lei Zhang!

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

9 years ago[MachO] Fixing copy-paste error from r273719
Chris Bieneman [Fri, 24 Jun 2016 21:06:52 +0000 (21:06 +0000)]
[MachO] Fixing copy-paste error from r273719

Thanks Kevin!

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

9 years agoAdd missing dependency to LLVMPasses
Michael Kuperstein [Fri, 24 Jun 2016 21:05:41 +0000 (21:05 +0000)]
Add missing dependency to LLVMPasses

Passes should depend on CodeGen, as that contains some IR-to-IR passes.

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

9 years ago[MemorySSA] Move code around a bit. NFC.
George Burgess IV [Fri, 24 Jun 2016 21:02:12 +0000 (21:02 +0000)]
[MemorySSA] Move code around a bit. NFC.

This patch moves MSSA's caching walker into MemorySSA, and moves the
actual definition of MSSA's caching walker out of MemorySSA.h. This is
done in preparation for the new walker, which should be out for review
soonish.

Also, this patch removes a field from UpwardsMemoryQuery and has a few
lines of diff from clang-format'ing MemorySSA.cpp.

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

9 years ago[APInt] Don't shift into the sign bit
David Majnemer [Fri, 24 Jun 2016 20:51:47 +0000 (20:51 +0000)]
[APInt] Don't shift into the sign bit

This fixes PR28294.

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

9 years ago[obj2yaml] [yaml2obj] Support for MachO Universal binaries
Chris Bieneman [Fri, 24 Jun 2016 20:42:28 +0000 (20:42 +0000)]
[obj2yaml] [yaml2obj] Support for MachO Universal binaries

This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets.

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

9 years ago[ARM] Remove dead SDNodes. NFC.
Ahmed Bougacha [Fri, 24 Jun 2016 20:38:00 +0000 (20:38 +0000)]
[ARM] Remove dead SDNodes. NFC.

The opcodes are used, but only by DAG->DAG.

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

9 years ago[X86] Remove dead ISD opcodes. NFC.
Ahmed Bougacha [Fri, 24 Jun 2016 20:37:55 +0000 (20:37 +0000)]
[X86] Remove dead ISD opcodes. NFC.

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

9 years ago[InstCombine] use m_APInt; NFCI
Sanjay Patel [Fri, 24 Jun 2016 20:36:34 +0000 (20:36 +0000)]
[InstCombine] use m_APInt; NFCI

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

9 years ago[PM] Port PreISelIntrinsicLowering to the new PM
Michael Kuperstein [Fri, 24 Jun 2016 20:13:42 +0000 (20:13 +0000)]
[PM] Port PreISelIntrinsicLowering to the new PM

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

9 years agoSimplifyInstruction does not imply DCE
David Majnemer [Fri, 24 Jun 2016 19:34:46 +0000 (19:34 +0000)]
SimplifyInstruction does not imply DCE

We cannot remove an instruction with no uses just because
SimplifyInstruction succeeds.  It may have side effects.

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

9 years ago[CodeView] Healthy paranoia around strings
David Majnemer [Fri, 24 Jun 2016 19:34:41 +0000 (19:34 +0000)]
[CodeView] Healthy paranoia around strings

Make sure strings don't get too big for a record, truncate them if
need-be.

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

9 years ago[AArch64] Adjust the model for the vector by element FP multiplies on Exynos M1....
Evandro Menezes [Fri, 24 Jun 2016 18:58:54 +0000 (18:58 +0000)]
[AArch64] Adjust the model for the vector by element FP multiplies on Exynos M1. (NFC)

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

9 years agoRevert r273545, "[IfConversion] Bugfix: Don't use undef flag while adding use operands."
Peter Collingbourne [Fri, 24 Jun 2016 18:57:29 +0000 (18:57 +0000)]
Revert r273545, "[IfConversion] Bugfix: Don't use undef flag while adding use operands."
as it caused PR28295.

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

9 years ago[InstCombine] refactor optional bitcasting in matchSelectFromAndOr() into one code...
Sanjay Patel [Fri, 24 Jun 2016 18:55:27 +0000 (18:55 +0000)]
[InstCombine] refactor optional bitcasting in matchSelectFromAndOr() into one code path (NFCI)

Tests to verify that the commuted variants are all exercised were added with:
http://reviews.llvm.org/rL273702

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

9 years agoUse shouldAssumeDSOLocal in isOffsetFoldingLegal.
Rafael Espindola [Fri, 24 Jun 2016 18:48:36 +0000 (18:48 +0000)]
Use shouldAssumeDSOLocal in isOffsetFoldingLegal.

This makes it slightly more powerful for dynamic-no-pic.

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

9 years agoRevert "InstCombine rule to fold trunc when value available"
Reid Kleckner [Fri, 24 Jun 2016 18:42:58 +0000 (18:42 +0000)]
Revert "InstCombine rule to fold trunc when value available"

This reverts commit r273608.

Broke building code with sanitizers, where apparently these kinds of
loads, casts, and truncations are common:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24502
http://crbug.com/623099

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

9 years ago[InstCombine] consolidate commutation variants of matchSelectFromAndOr() in one place...
Sanjay Patel [Fri, 24 Jun 2016 18:26:02 +0000 (18:26 +0000)]
[InstCombine] consolidate commutation variants of matchSelectFromAndOr() in one place; NFCI

By putting all the possible commutations together, we simplify the code.
Note that this is NFCI, but I'm adding tests that actually exercise each
commutation pattern because we don't have this anywhere else.

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

9 years agoThread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow
Kevin Enderby [Fri, 24 Jun 2016 18:24:42 +0000 (18:24 +0000)]
Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow
a good error message to be produced.

This is nearly the last libObject interface that used ErrorOr and the last one
that appears in llvm/include/llvm/Object/MachO.h .  For Mach-O objects this is
just a clean up because it’s version of getSymbolAddress() can’t return an
error.

I will leave it to the experts on COFF and ELF to actually add meaning full
error messages in their tests if they wish.  And also leave it to these experts
to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h
for createCOFFObjectFile() and createELFObjectFile() if they wish.

Since there are no test cases for COFF and ELF error cases with respect to
getSymbolAddress() in the test suite this is no functional change (NFC).

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

9 years agoCodegen: Fix broken assumption in Tail Merge.
Kyle Butt [Fri, 24 Jun 2016 18:16:36 +0000 (18:16 +0000)]
Codegen: Fix broken assumption in Tail Merge.

Tail merge was making the assumption that a layout successor or
predecessor was always a cfg successor/predecessor. Remove that
assumption. Changes to tests are necessary because the errant cfg edges
were preventing optimizations.

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

9 years agoUse FileCheck. NFC.
Rafael Espindola [Fri, 24 Jun 2016 18:04:39 +0000 (18:04 +0000)]
Use FileCheck. NFC.

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

9 years ago[codeview] Emit parameter variables in the right order
Reid Kleckner [Fri, 24 Jun 2016 17:55:40 +0000 (17:55 +0000)]
[codeview] Emit parameter variables in the right order

Clang emits them in reverse order to conform to the ABI, which requires
left-to-right destruction. As a result, the order doesn't fall out
naturally, and we have to sort things out in the backend.

Fixes PR28213

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

9 years agoLinker: Copy metadata when linking declarations.
Peter Collingbourne [Fri, 24 Jun 2016 17:42:21 +0000 (17:42 +0000)]
Linker: Copy metadata when linking declarations.

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

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

9 years ago[codeview] Use one byte for S_FRAMECOOKIE CookieKind and add flags byte
Reid Kleckner [Fri, 24 Jun 2016 17:23:49 +0000 (17:23 +0000)]
[codeview] Use one byte for S_FRAMECOOKIE CookieKind and add flags byte

We bailed out while printing codeview for an MSVC compiled
SemaExprCXX.cpp that used this record. The MS reference headers look
incorrect here, which is probably why we had this bug. They use a 32-bit
enum as the field type, but the actual record appears to use one byte
for the cookie kind followed by a flags byte.

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

9 years ago[MDT] Always verify machine dominfo if expensive checking is enabled.
Chad Rosier [Fri, 24 Jun 2016 17:15:04 +0000 (17:15 +0000)]
[MDT] Always verify machine dominfo if expensive checking is enabled.

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

9 years ago[codeview] Emit base class information from DW_TAG_inheritance nodes
Reid Kleckner [Fri, 24 Jun 2016 16:24:24 +0000 (16:24 +0000)]
[codeview] Emit base class information from DW_TAG_inheritance nodes

There are two remaining issues here:
1. No vbptr information
2. Need to mention indirect virtual bases

Getting indirect virtual bases is just a matter of adding an "indirect"
flag, emitting them in the frontend, and ignoring them when appropriate
for DWARF.

All virtual bases use the same artificial vbptr field, so I think the
vbptr offset will be best represented by an implicit __vbptr$ClassName
member similar to our existing __vptr$ member.

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

9 years ago[LV] Preserve order of dependences in interleaved accesses analysis
Matthew Simpson [Fri, 24 Jun 2016 15:33:25 +0000 (15:33 +0000)]
[LV] Preserve order of dependences in interleaved accesses analysis

The interleaved access analysis currently assumes that the inserted run-time
pointer aliasing checks ensure the absence of dependences that would prevent
its instruction reordering. However, this is not the case.

Issues can arise from how code generation is performed for interleaved groups.
For a load group, all loads in the group are essentially moved to the location
of the first load in program order, and for a store group, all stores in the
group are moved to the location of the last store. For groups having members
involved in a dependence relation with any other instruction in the loop, this
reordering can violate the dependence.

This patch teaches the interleaved access analysis how to avoid breaking such
dependences, and should fix PR27626.

An assumption of the original analysis was that the accesses had been collected
in "program order". The analysis was then simplified by visiting the accesses
bottom-up. However, this ordering was never guaranteed for anything other than
single basic block loops. Thus, this patch also enforces the desired ordering.

Reference: https://llvm.org/bugs/show_bug.cgi?id=27626
Differential Revision: http://reviews.llvm.org/D19984

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

9 years agoRemangle intrinsics names when types are renamed
Artur Pilipenko [Fri, 24 Jun 2016 15:10:29 +0000 (15:10 +0000)]
Remangle intrinsics names when types are renamed

This is a resubmittion of previously reverted rL273568.

This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html

Reviewers: mehdi_amini, reames

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

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

9 years agoNFC. Move verifyIntrinsicIsVarArg from verifier to Intrinsic::matchIntrinsicVarArg...
Artur Pilipenko [Fri, 24 Jun 2016 14:47:27 +0000 (14:47 +0000)]
NFC. Move verifyIntrinsicIsVarArg from verifier to Intrinsic::matchIntrinsicVarArg since it will be reused for intrinsic remangling code

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

9 years agoExecutionEngine: silence unused value warning
Saleem Abdulrasool [Fri, 24 Jun 2016 14:31:09 +0000 (14:31 +0000)]
ExecutionEngine: silence unused value warning

The Value is only used in debug or asserts builds.  Just cast to void to silence
an unused variable warning.

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

9 years agoExecutionEngine: add preliminary support for COFF ARM
Saleem Abdulrasool [Fri, 24 Jun 2016 14:11:44 +0000 (14:11 +0000)]
ExecutionEngine: add preliminary support for COFF ARM

This adds rudimentary support for COFF ARM to the dynamic loader for the
exeuction engine.  This can be used by lldb to JIT code into a COFF ARM
environment.  This lays the foundation for the loader, though a few of the
relocation types are yet unhandled.

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

9 years agoMake sure Format is always initialized.
Rafael Espindola [Fri, 24 Jun 2016 13:47:29 +0000 (13:47 +0000)]
Make sure Format is always initialized.

Should fix the msan bots.

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

9 years ago[MachineDominatorTree] Add a MDT verifier.
Chad Rosier [Fri, 24 Jun 2016 13:32:22 +0000 (13:32 +0000)]
[MachineDominatorTree] Add a MDT verifier.

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

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

9 years agoUse existing predicate. NFC.
Rafael Espindola [Fri, 24 Jun 2016 13:28:26 +0000 (13:28 +0000)]
Use existing predicate. NFC.

This doesn't handle ELF, but neither did the previous code.

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

9 years agoMerge two identical if branches. NFC.
Rafael Espindola [Fri, 24 Jun 2016 13:08:06 +0000 (13:08 +0000)]
Merge two identical if branches. NFC.

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

9 years agoMerge two identical if branches. NFC.
Rafael Espindola [Fri, 24 Jun 2016 13:05:20 +0000 (13:05 +0000)]
Merge two identical if branches. NFC.

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

9 years agoclang-format a region. NFC.
Rafael Espindola [Fri, 24 Jun 2016 12:58:25 +0000 (12:58 +0000)]
clang-format a region. NFC.

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

9 years ago[LICM] Avoid repeating expensive call while promoting loads. NFC
Anna Thomas [Fri, 24 Jun 2016 12:38:45 +0000 (12:38 +0000)]
[LICM] Avoid repeating expensive call while promoting loads. NFC

Summary:
We can avoid repeating the check `isGuaranteedToExecute` when it's already called once while checking if the alignment can be widened for the load/store being hoisted.

The function is invariant for the same instruction `UI` in `isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);`

Reviewers: hfinkel, eli.friedman

Subscribers: llvm-commits

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

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

9 years agoRevert r273664
Hubert Tong [Fri, 24 Jun 2016 12:25:15 +0000 (12:25 +0000)]
Revert r273664

Revert change until build issues with MSVC can be resolved.

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

9 years ago[mips] Use --check-prefixes where appropriate. NFC.
Daniel Sanders [Fri, 24 Jun 2016 12:23:17 +0000 (12:23 +0000)]
[mips] Use --check-prefixes where appropriate. NFC.

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

9 years agoAdd FixedSizeStorage to TrailingObjects; NFC
Hubert Tong [Fri, 24 Jun 2016 11:34:16 +0000 (11:34 +0000)]
Add FixedSizeStorage to TrailingObjects; NFC

Summary: This change introduces two types, `FixedSizeStorage` and `FixedSizeStorageOwner`, which can be used to provide stack-allocated objects with trailing objects.

Reviewers: rsmith, faisalv, aaron.ballman

Subscribers: llvm-commits, cfe-commits, nwilson

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

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

9 years agoRevert "Revert "[misched] Extend scheduler to handle unsupported features""
Simon Dardis [Fri, 24 Jun 2016 08:43:27 +0000 (08:43 +0000)]
Revert "Revert "[misched] Extend scheduler to handle unsupported features""

This reverts commit r273565.

This was an over-eager revert.

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

9 years agoAMDGPU: Add stub custom CodeGenPrepare pass
Matt Arsenault [Fri, 24 Jun 2016 07:07:55 +0000 (07:07 +0000)]
AMDGPU: Add stub custom CodeGenPrepare pass

This will do various things including ones
CodeGenPrepare does, but with knowledge of uniform
values.

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

9 years agoRemove hack introduced by r273641.
George Burgess IV [Fri, 24 Jun 2016 06:58:15 +0000 (06:58 +0000)]
Remove hack introduced by r273641.

Hopefully the buildbots have had enough time to pick this up by now.

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

9 years agoAMDGPU: Un-xfail and add tests
Matt Arsenault [Fri, 24 Jun 2016 06:58:01 +0000 (06:58 +0000)]
AMDGPU: Un-xfail and add tests

Un XFAIL a few tests plus a few more I had lying around
in my tree, which seem to all work now but I don't see tests
that quite test the same things.

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

9 years agoAMDGPU: Remove disable-irstructurizer subtarget feature
Matt Arsenault [Fri, 24 Jun 2016 06:30:22 +0000 (06:30 +0000)]
AMDGPU: Remove disable-irstructurizer subtarget feature

The only real reason to use it is for testing, so replace
it with a command line option instead of a potentially function
dependent feature.

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

9 years agoAMDGPU: Cleanup subtarget handling.
Matt Arsenault [Fri, 24 Jun 2016 06:30:11 +0000 (06:30 +0000)]
AMDGPU: Cleanup subtarget handling.

Split AMDGPUSubtarget into amdgcn/r600 specific subclasses.
This removes most of the static_casting of the basic codegen
classes everywhere, and tries to restrict the features
visible on the wrong target.

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

9 years agoUse the same underlying type for bitfields
David Majnemer [Fri, 24 Jun 2016 04:05:25 +0000 (04:05 +0000)]
Use the same underlying type for bitfields

MSVC allocates fresh storage for consecutive bitfields with different
underlying types.

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

9 years agoSwitch more loops to be range-based
David Majnemer [Fri, 24 Jun 2016 04:05:21 +0000 (04:05 +0000)]
Switch more loops to be range-based

This makes the code a little more concise, no functional change is
intended.

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

9 years ago[X86] Combine two nearby calls to isSingleInputShuffleVector. NFC
Craig Topper [Fri, 24 Jun 2016 03:06:11 +0000 (03:06 +0000)]
[X86] Combine two nearby calls to isSingleInputShuffleVector. NFC

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

9 years ago[llvm-cov] Fix two warnings
Vedant Kumar [Fri, 24 Jun 2016 02:33:01 +0000 (02:33 +0000)]
[llvm-cov] Fix two warnings

They were using output streams inconsistently. One also had a grammar
bug.

I noticed these while trying to pare down D18278.

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