oota-llvm.git
8 years ago[WinEH] Update CoreCLR EH state numbering
Joseph Tremoulet [Mon, 4 Jan 2016 16:16:01 +0000 (16:16 +0000)]
[WinEH] Update CoreCLR EH state numbering

Summary:
Fix the CLR state numbering to generate correct tables, and update the lit
test to verify them.

The CLR numbering assigns one state number to each catchpad and
cleanuppad.

It also computes two tree-like relations over states:
 1) Each state has a "HandlerParentState", which is the state of the next
    outer handler enclosing this state's handler (same as nearest ancestor
    per the ParentPad linkage on EH pads, but skipping over catchswitches).
 2) Each state has a "TryParentState", which:
    a) for a catchpad that's not the last handler on its catchswitch, is
       the state of the next catchpad on that catchswitch.
    b) for all other pads, is the state of the pad whose try region is the
       next outer try region enclosing this state's try region.  The "try
       regions are not present as such in the IR, but will be inferred
       based on the placement of invokes and pads which reach each other
       by exceptional exits.

Catchswitches do not get their own states, but each gets mapped to the
state of its first catchpad.

Table generation requires each state's "unwind dest" state to have a lower
state number than the given state.

Since HandlerParentState can be computed as a function of a pad's
ParentPad, and TryParentState can be computed as a function of its unwind
dest and the TryParentStates of its children, the CLR state numbering
algorithm first computes HandlerParentState in a top-down pass, then
computes TryParentState in a bottom-up pass.

Also reword some comments/names in the CLR EH table generation to make the
distinction between the different kinds of "parent" clear.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: AndyAyers, llvm-commits

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

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

8 years agoAMDGPU: Avoid assertions after SGPR spilling failed
Nicolai Haehnle [Mon, 4 Jan 2016 15:50:01 +0000 (15:50 +0000)]
AMDGPU: Avoid assertions after SGPR spilling failed

Summary:
The comment explains it: emitError does not necessarily exit the compilation
process, and then using NoRegister leads to assertions later on.
This generates incorrect code, of course, but the user should know to not use
the result when an error has been emitted.

It would be nice to have a test-case for this inside the LLVM repository,
but llc exits on error. shader-db tests trigger the underlying issue at least
on Tonga.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits

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

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

8 years ago[AVX512] add PSRAD and PSRAQ Intrinsic
Michael Zuckerman [Mon, 4 Jan 2016 13:45:45 +0000 (13:45 +0000)]
[AVX512] add PSRAD and PSRAQ Intrinsic

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

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

8 years ago[AVX512] add PSRAW Intrinsic
Michael Zuckerman [Mon, 4 Jan 2016 12:50:36 +0000 (12:50 +0000)]
[AVX512] add PSRAW Intrinsic

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

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

8 years ago[MC] Fix file name in file header
Jeroen Ketema [Mon, 4 Jan 2016 12:22:34 +0000 (12:22 +0000)]
[MC] Fix file name in file header

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

8 years ago[AVX512] add PSRLV Intrinsic
Michael Zuckerman [Mon, 4 Jan 2016 11:39:06 +0000 (11:39 +0000)]
[AVX512] add PSRLV Intrinsic

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

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

8 years agoFix a horrible infloop in value tracking in the face of dead code.
Chandler Carruth [Mon, 4 Jan 2016 07:23:12 +0000 (07:23 +0000)]
Fix a horrible infloop in value tracking in the face of dead code.

Amazingly, we just never triggered this without:
1) Moving code around for MetadataTracking so that a certain *different*
   amount of inlining occurs in the per-TU compile step.
2) Then you LTO opt or clang with a bootstrap, and get inlining, loop
   opts, and GVN line up everything *just* right.

I don't really know how we didn't hit this before. We really need to be
fuzz testing stuff, it shouldn't be hard to trigger. I'm working on
crafting a reduced nice test case, and will submit that when I have it,
but I want to get LTO build bots going again.

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

8 years ago[TableGen] Fix a typo in r256733.
Craig Topper [Mon, 4 Jan 2016 06:35:08 +0000 (06:35 +0000)]
[TableGen] Fix a typo in r256733.

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

8 years ago[TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit...
Craig Topper [Mon, 4 Jan 2016 06:28:49 +0000 (06:28 +0000)]
[TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC

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

8 years ago[TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the...
Craig Topper [Mon, 4 Jan 2016 04:51:51 +0000 (04:51 +0000)]
[TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.

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

8 years ago[X86] Make hasFP constant time
David Majnemer [Mon, 4 Jan 2016 04:49:41 +0000 (04:49 +0000)]
[X86] Make hasFP constant time

We need a frame pointer if there is a push/pop sequence after the
prologue in order to unwind the stack.  Scanning the instructions to
figure out if this happened made hasFP not constant-time which is a
violation of expectations.  Let's compute this up-front and reuse that
computation when we need it.

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

8 years ago[LICM] Make instruction sinking funclet-aware
David Majnemer [Mon, 4 Jan 2016 03:37:39 +0000 (03:37 +0000)]
[LICM] Make instruction sinking funclet-aware

We had two bugs here:
- We might try to sink into a catchswitch, causing verifier failures.
- We will succeed in sinking into a cleanuppad but we didn't update the
  funclet operand bundle.

This fixes PR26000.

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

8 years ago[TableGen] Change TGParser::SetValue to take an ArrayRef instead of std::vector refer...
Craig Topper [Mon, 4 Jan 2016 03:15:08 +0000 (03:15 +0000)]
[TableGen] Change TGParser::SetValue to take an ArrayRef instead of std::vector reference. Use None in many places where a default constructed vector was being passed. NFC

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

8 years ago[TableGen] Fix a bug that caused the wrong name for a record built from a multiclass...
Craig Topper [Mon, 4 Jan 2016 03:05:14 +0000 (03:05 +0000)]
[TableGen] Fix a bug that caused the wrong name for a record built from a multiclass containing a defm called NAME that references another multiclass that contains a defm that uses NAME concatenated with other strings.

It would end up doing the concatenations from the second multiclass twice. This occured because SetValue detected a self assignment when trying to set the value of NAME to a VarInit called NAME. NAME is special here and it will get cleaned up later. So add a flag to suppress the self assignment check for this case.

Strangely the self-assignment error was returning false indicating it wasn't an error, but it wasn't doing the right thing. So this also changes it to report an error.

This fixes the names of some AVX512 FMA instructions that showed this double expansion.

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

8 years agollvm/include/llvm/ProfileData/InstrProfData.inc: Add c++-mode in the header.
NAKAMURA Takumi [Mon, 4 Jan 2016 00:47:33 +0000 (00:47 +0000)]
llvm/include/llvm/ProfileData/InstrProfData.inc: Add c++-mode in the header.

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

8 years agoFix one file that I didn't convert properly in r256707.
Dimitry Andric [Sun, 3 Jan 2016 22:33:32 +0000 (22:33 +0000)]
Fix one file that I didn't convert properly in r256707.

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

8 years agoUse std::is_sorted and std::none_of instead of manual loops. NFC
Craig Topper [Sun, 3 Jan 2016 19:43:40 +0000 (19:43 +0000)]
Use std::is_sorted and std::none_of instead of manual loops. NFC

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

8 years ago[PGO] Cleanup: remove reduncant calls in lowering
Xinliang David Li [Sun, 3 Jan 2016 19:38:51 +0000 (19:38 +0000)]
[PGO] Cleanup: remove reduncant calls in lowering

CoverageMapping data's section and alignment is
already set during creation. No need to call it again
during lowering.

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

8 years ago[PGO] Cleanup: Use covmap header definition in the template file
Xinliang David Li [Sun, 3 Jan 2016 19:26:07 +0000 (19:26 +0000)]
[PGO] Cleanup: Use covmap header definition in the template file

This is one last remaining instrumentatation related structure
that needs to be migrate to use the centralized template
definition.  With this change, instrumentation code
related to coverage module header will be kept in sync
with the coverage mapping reader. The remaining code
which makes implicit assumption about covmap control
structure layout in the the lowering pass will cleaned
up in a different patch. This patch is not intended to
have no functional change.

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

8 years ago[X86][MMX] Regenerated vector insertion test.
Simon Pilgrim [Sun, 3 Jan 2016 19:17:37 +0000 (19:17 +0000)]
[X86][MMX] Regenerated vector insertion test.

Shows the true horror of what is going on....

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

8 years ago[PGO] Code refactoring to use header struct def /NFC
Xinliang David Li [Sun, 3 Jan 2016 18:57:40 +0000 (18:57 +0000)]
[PGO] Code refactoring to use header struct def /NFC

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

8 years ago[PGO] Introduce coverage map header structure in PGO data template file /NFC
Xinliang David Li [Sun, 3 Jan 2016 18:35:56 +0000 (18:35 +0000)]
[PGO] Introduce coverage map header structure in PGO data template file /NFC

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

8 years ago[SelectionDAG] Pulled out common code for CONCAT_VECTORS node creation
Simon Pilgrim [Sun, 3 Jan 2016 18:24:19 +0000 (18:24 +0000)]
[SelectionDAG] Pulled out common code for CONCAT_VECTORS node creation

Pulled out the similar CONCAT_VECTORS creation code from the 2/3 operand getNode() calls (to handle all UNDEF and all BUILD_VECTOR cases). Added a similar handler to the general getNode() call as well.

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

8 years ago[X86][SSE] Added tests for insertion of zero elements into vectors
Simon Pilgrim [Sun, 3 Jan 2016 17:33:32 +0000 (17:33 +0000)]
[X86][SSE] Added tests for insertion of zero elements into vectors

Many of these could be much better if we just lowered them all as shuffles - especially for the 256-bit vectors.

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

8 years agoFix several accidental DOS line endings in source files
Dimitry Andric [Sun, 3 Jan 2016 17:22:03 +0000 (17:22 +0000)]
Fix several accidental DOS line endings in source files

Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings.  Convert these to native line endings.

There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.

Reviewers: joerg, aaron.ballman

Subscribers: aaron.ballman, sanjoy, dsanders, llvm-commits

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

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

8 years ago[X86][SSE41] Added test cases for improving insertps shuffles
Simon Pilgrim [Sun, 3 Jan 2016 17:14:15 +0000 (17:14 +0000)]
[X86][SSE41] Added test cases for improving insertps shuffles

As mentioned on D14261, an upcoming patch will improve combines of insertps instructions.

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

8 years ago[X86][SSE] Added v4f32 shuffle with zero tests
Simon Pilgrim [Sun, 3 Jan 2016 17:02:56 +0000 (17:02 +0000)]
[X86][SSE] Added v4f32 shuffle with zero tests

This is mainly test cases for improvements to insertps matching, but pre-SSE41 shuffles could be improved as well

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

8 years ago[TableGen] Simplify some code slightly. No need to check if the arrays are empty...
Craig Topper [Sun, 3 Jan 2016 08:57:41 +0000 (08:57 +0000)]
[TableGen] Simplify some code slightly. No need to check if the arrays are empty before printing. The loop can be made to print the same thing if the loop is empty. NFC

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

8 years agoUse an ArrayRef to simplify repeated calculation of the array end. NFC
Craig Topper [Sun, 3 Jan 2016 08:45:36 +0000 (08:45 +0000)]
Use an ArrayRef to simplify repeated calculation of the array end. NFC

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

8 years agoUse std::is_sorted instead of manual loops. NFC
Craig Topper [Sun, 3 Jan 2016 07:33:45 +0000 (07:33 +0000)]
Use std::is_sorted instead of manual loops. NFC

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

8 years agoUse range-based for loop. NFC
Craig Topper [Sun, 3 Jan 2016 07:33:42 +0000 (07:33 +0000)]
Use range-based for loop. NFC

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

8 years ago[TableGen] Replace a logically negated xor of bools with just an equality comparison...
Craig Topper [Sun, 3 Jan 2016 07:33:39 +0000 (07:33 +0000)]
[TableGen] Replace a logically negated xor of bools with just an equality comparison for readability. NFC

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

8 years ago[TableGen] Use std::find_if and a lambda instead of manual loops.
Craig Topper [Sun, 3 Jan 2016 07:33:36 +0000 (07:33 +0000)]
[TableGen] Use std::find_if and a lambda instead of manual loops.

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

8 years ago[TableGen] Fix a bug introduced in r256627. If the switch was not emitted we still...
Craig Topper [Sun, 3 Jan 2016 07:33:34 +0000 (07:33 +0000)]
[TableGen] Fix a bug introduced in r256627. If the switch was not emitted we still emitted a closing curly brace.

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

8 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Sun, 3 Jan 2016 07:33:30 +0000 (07:33 +0000)]
[TableGen] Use range-based for loops. NFC

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

8 years ago[PGO] simple refactoring (NFC)
Xinliang David Li [Sun, 3 Jan 2016 04:38:13 +0000 (04:38 +0000)]
[PGO] simple refactoring (NFC)

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

8 years agoWinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
NAKAMURA Takumi [Sun, 3 Jan 2016 01:41:00 +0000 (01:41 +0000)]
WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]

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

8 years ago[Verifier] Add braces to satisfy buildbots. NFC
Joseph Tremoulet [Sat, 2 Jan 2016 15:50:34 +0000 (15:50 +0000)]
[Verifier] Add braces to satisfy buildbots. NFC

Fix build break introduced by r256691.

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

8 years ago[WinEH] Verify catchswitch handlers
Joseph Tremoulet [Sat, 2 Jan 2016 15:25:25 +0000 (15:25 +0000)]
[WinEH] Verify catchswitch handlers

Summary:
The handler list must be nonempty and consist solely of CatchPads.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

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

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

8 years ago[WinEH] Tighten parentPad verifier checks
Joseph Tremoulet [Sat, 2 Jan 2016 15:24:24 +0000 (15:24 +0000)]
[WinEH] Tighten parentPad verifier checks

Summary: A catchswitch cannot be a parent of a cleanuppad or another catchswitch.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

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

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

8 years ago[WinEH] Update catchrets with cloned successors
Joseph Tremoulet [Sat, 2 Jan 2016 15:22:36 +0000 (15:22 +0000)]
[WinEH] Update catchrets with cloned successors

Summary:
Add a pass to update catchrets when their successors get cloned; the
existing pass doesn't catch these because it walks the funclet whose
blocks are being cloned but the catchret is in a child funclet.

Also update the test for removing incoming PHI values; when the
predecessor is a catchret, the relevant color is the catchret's parentPad,
not its block's color.

Reviewers: andrew.w.kaylor, rnk, majnemer

Subscribers: llvm-commits

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

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

8 years agoCorrect misleading formatting of several ifs followed by two statements without braces.
Yaron Keren [Sat, 2 Jan 2016 13:40:36 +0000 (13:40 +0000)]
Correct misleading formatting of several ifs followed by two statements without braces.
While the original code would work with or without braces, it makes sense to
set HaveSemi to true only if (!HaveSemi), otherwise it's already true, so I
put the assignment inside the if block. This addresses PR25998.

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

8 years ago[WinEH] Add additional verification
David Majnemer [Sat, 2 Jan 2016 09:26:36 +0000 (09:26 +0000)]
[WinEH] Add additional verification

Recolor the IR to make sure our computed colors are not hiding any bugs.
Also, verifyFunction if we are running some post-preparation operations;
some of these operations can hide latent bugs.

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

8 years ago[X86] Add intrinsics for reading and writing to the flags register
David Majnemer [Fri, 1 Jan 2016 06:50:01 +0000 (06:50 +0000)]
[X86] Add intrinsics for reading and writing to the flags register

LLVM's targets need to know if stack pointer adjustments occur after the
prologue.  This is needed to correctly determine if the red-zone is
appropriate to use or if a frame pointer is required.

Normally, LLVM can figure this out very precisely by reasoning about the
contents of the MachineFunction.  There is an interesting corner case:
inline assembly.

The vast majority of inline assembly which will perform a push or pop is
done so to pair up with pushf or popf as appropriate.  Unfortunately,
this inline assembly doesn't mark the stack pointer as clobbered
because, well, it isn't.  The stack pointer is decremented and then
immediately incremented.  Because of this, LLVM was changed in r256456
to conservatively assume that inline assembly contain a sequence of
stack operations.  This is unfortunate because the vast majority of
inline assembly will not end up manipulating the stack pointer in any
way at all.

Instead, let's provide a more principled solution: an intrinsic.
FWIW, other compilers (MSVC and GCC among them) also provide this
functionality as an intrinsic.

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

8 years ago[LibCallSimplifier] propagate FMF when shrinking binary calls
Sanjay Patel [Thu, 31 Dec 2015 23:40:59 +0000 (23:40 +0000)]
[LibCallSimplifier] propagate FMF when shrinking binary calls

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

8 years ago[X86] Remove a return after llvm_unreachable.
Craig Topper [Thu, 31 Dec 2015 22:40:48 +0000 (22:40 +0000)]
[X86] Remove a return after llvm_unreachable.

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

8 years ago[X86] Move shuffle decoding for constant pool into the X86CodeGen library to remove...
Craig Topper [Thu, 31 Dec 2015 22:40:45 +0000 (22:40 +0000)]
[X86] Move shuffle decoding for constant pool into the X86CodeGen library to remove a layering violation in the Util library.

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

8 years ago[LibCallSimplifier] propagate FMF when shrinking unary calls
Sanjay Patel [Thu, 31 Dec 2015 21:52:31 +0000 (21:52 +0000)]
[LibCallSimplifier] propagate FMF when shrinking unary calls

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

8 years agochange function names to avoid accidentally matching the substring
Sanjay Patel [Thu, 31 Dec 2015 21:25:25 +0000 (21:25 +0000)]
change function names to avoid accidentally matching the substring

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

8 years agoadd 'fast' attribute to calls to show that the flag isn't being propagated
Sanjay Patel [Thu, 31 Dec 2015 21:12:19 +0000 (21:12 +0000)]
add 'fast' attribute to calls to show that the flag isn't being propagated

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

8 years agoVariable names start with an upper case letter; NFC
Sanjay Patel [Thu, 31 Dec 2015 16:16:58 +0000 (16:16 +0000)]
Variable names start with an upper case letter; NFC

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

8 years agofix formatting; NFC
Sanjay Patel [Thu, 31 Dec 2015 16:10:49 +0000 (16:10 +0000)]
fix formatting; NFC

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

8 years agoadd FMF for CreateCall variant
Sanjay Patel [Thu, 31 Dec 2015 15:39:34 +0000 (15:39 +0000)]
add FMF for CreateCall variant

The version with OpBundles was missed in:
http://reviews.llvm.org/rL255555

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

8 years ago[AVX512] add PSRLQ and PSRLD Intrinsic
Michael Zuckerman [Thu, 31 Dec 2015 15:22:04 +0000 (15:22 +0000)]
[AVX512] add PSRLQ and PSRLD Intrinsic

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

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

8 years ago[X86] Avoid folding scalar loads into unary sse intrinsics
Michael Kuperstein [Thu, 31 Dec 2015 09:45:16 +0000 (09:45 +0000)]
[X86] Avoid folding scalar loads into unary sse intrinsics

Not folding these cases tends to avoid partial register updates:
sqrtss (%eax), %xmm0
Has a partial update of %xmm0, while
movss (%eax), %xmm0
sqrtss %xmm0, %xmm0
Has a clobber of the high lanes immediately before the partial update,
avoiding a potential stall.

Given this, we only want to fold when optimizing for size.
This is consistent with the patterns we already have for some of
the fp/int converts, and in X86InstrInfo::foldMemoryOperandImpl()

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

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

8 years ago[X86][PKU] Add {RD,WR}PKRU intrinsics
Asaf Badouh [Thu, 31 Dec 2015 08:31:13 +0000 (08:31 +0000)]
[X86][PKU] Add {RD,WR}PKRU intrinsics

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

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

8 years ago[TableGen] Modify the AsmMatcherEmitter to only apply the table growth from r252440...
Craig Topper [Thu, 31 Dec 2015 08:18:23 +0000 (08:18 +0000)]
[TableGen] Modify the AsmMatcherEmitter to only apply the table growth from r252440 to the Hexagon target.

This restores the previous behavior of not including the mnemonic in the classes table for every target that starts instruction lines with the mnemonic. Not only did the table size increase by 1 entry, but the class enum increased in size which caused every class in the array to increase in size. It also grew the size of the function that parsers tokens into classes by a substantial amount.

This adds a new HasMnemonicFirst flag to all AsmParsers. It's set to 1 by default and Hexagon target overrides it to 0.

For the X86 target alone this recovers 324KB of size on the llvm-mc executable.

I believe the current state is still a bad design choice for the Hexagon target as it causes most of the parsing to do a linear search through the entire match table to comparing operands against every instruction until it finds one that works. At least for the other targets we do a binary search based on mnemonic over which to do the linear scan.

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

8 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Thu, 31 Dec 2015 08:18:20 +0000 (08:18 +0000)]
[TableGen] Use range-based for loops. NFC

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

8 years ago[PGO]: Implement Func PGO name string compression
Xinliang David Li [Thu, 31 Dec 2015 07:57:16 +0000 (07:57 +0000)]
[PGO]: Implement Func PGO name string compression

This is part of the effort/prepration to reduce the size
instr-pgo (object, binary, memory footprint, and raw data).

The functionality is currently off by default and not yet
used by any clients.

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

8 years ago[TableGen] Move determination of IsIsolatedToken into the tokenizer instead of trying...
Craig Topper [Thu, 31 Dec 2015 05:01:45 +0000 (05:01 +0000)]
[TableGen] Move determination of IsIsolatedToken into the tokenizer instead of trying to search characters around the token. No functional change intended. Verified for in-tree targets.

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

8 years agoRevert "Revert "[ptr-traits] Implement the base pointer traits using the actual""
Chandler Carruth [Wed, 30 Dec 2015 23:37:25 +0000 (23:37 +0000)]
Revert "Revert "[ptr-traits] Implement the base pointer traits using the actual""

This reverts commit r256642 and restores r256620 now that Tobias has
updated Polly.

There are still some potential problems with the code in Polly that I've
sent post-commit review about, but they're unlikely to break anything in
practice, and I'd like to avoid the rest of LLVM and Clang regressing
here.

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

8 years ago[ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic shift...
Sanjay Patel [Wed, 30 Dec 2015 22:40:52 +0000 (22:40 +0000)]
[ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic shift right (PR25900)

This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=25900

If we think that an arithmetic right shift of a power of two is always a power of two,
an sdiv gets wrongly converted to udiv.

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

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

8 years ago[ThinLTO] Rename variables used in metadata linking (NFC)
Teresa Johnson [Wed, 30 Dec 2015 21:13:55 +0000 (21:13 +0000)]
[ThinLTO] Rename variables used in metadata linking (NFC)

As suggested in review for r255909, rename MDMaterialized to AllowTemps,
and identify the name of the boolean flag being set in calls to
saveMetadataList.

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

8 years agoEnsure MDNode used as key in metadata linking map cannot be RAUWed
Teresa Johnson [Wed, 30 Dec 2015 19:32:24 +0000 (19:32 +0000)]
Ensure MDNode used as key in metadata linking map cannot be RAUWed

As suggested in review for r255909, add a way to ensure that temporary
MD used as keys in the MetadataToID map during ThinLTO importing are not
RAUWed.

Add support for marking an MDNode as not replaceable. Clear the new
CanReplace flag when adding a temporary MD node to the MetadataToID map
and clear it when destroying the map.

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

8 years ago[ThinLTO] Check MDNode values saved for metadata linking (NFC)
Teresa Johnson [Wed, 30 Dec 2015 19:13:57 +0000 (19:13 +0000)]
[ThinLTO] Check MDNode values saved for metadata linking (NFC)

Add an assert suggested in review for r255909 to ensure that MDNodes
saved in the map used for metadata linking are either temporary or
resolved.

Also add a comment clarifying why we may need to save off non-MDNode
metadata.

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

8 years agofix formatting; NFC
Sanjay Patel [Wed, 30 Dec 2015 18:31:30 +0000 (18:31 +0000)]
fix formatting; NFC

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

8 years agoRevert "[ptr-traits] Implement the base pointer traits using the actual"
Tobias Grosser [Wed, 30 Dec 2015 14:02:58 +0000 (14:02 +0000)]
Revert "[ptr-traits] Implement the base pointer traits using the actual"

The commit we revert is rather small, but it enables a larger piece of new
infrastructure that allows to detected misuses of pointer-traits at compile
time. Unfortunately, this change breaks with the use of incomplete types (e.g.
in Polly). As I am not aware of a simple fix on the Polly side, I temporarely
revert this commit to clean the bots and sync-up with Chandler how to best
adapt to these recent changes.

This reverts commit https://llvm.org/svn/llvm-project/llvm/trunk@256620.

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

8 years ago[TableGen] Remove unnecessary conversion from StringRef to std::string when outputtin...
Craig Topper [Wed, 30 Dec 2015 06:00:24 +0000 (06:00 +0000)]
[TableGen] Remove unnecessary conversion from StringRef to std::string when outputting to a raw_ostream. NFC

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

8 years ago[TableGen] Remove raw_string_ostream by just emitting the header for the switch the...
Craig Topper [Wed, 30 Dec 2015 06:00:22 +0000 (06:00 +0000)]
[TableGen] Remove raw_string_ostream by just emitting the header for the switch the first time we emit a case. If the header was never emitted just print the default at the end. NFC

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

8 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Wed, 30 Dec 2015 06:00:20 +0000 (06:00 +0000)]
[TableGen] Use range-based for loops. NFC

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

8 years ago[TableGen] Move more things that come from variant into the AsmVariantInfo class...
Craig Topper [Wed, 30 Dec 2015 06:00:18 +0000 (06:00 +0000)]
[TableGen] Move more things that come from variant into the AsmVariantInfo class so we can reduce some parameters. NFC

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

8 years ago[TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types...
Craig Topper [Wed, 30 Dec 2015 06:00:15 +0000 (06:00 +0000)]
[TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types of addAsmOperand. Simplify some code by using StringRef::find instead of std::find. These were previously done in r247527 and r247528, but another commit seems to have erased them. NFC

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

8 years ago[ptr-traits] Implement the base pointer traits using the actual
Chandler Carruth [Wed, 30 Dec 2015 04:00:24 +0000 (04:00 +0000)]
[ptr-traits] Implement the base pointer traits using the actual
alignment of the pointee type!

This is the culmination of the ptr-traits work. Now the compiler will
catch me if I try to use a pointer to an empty struct as a key in
a dense map or inside a PointerIntPair or PointerUnion! This is much,
much better than sometimes corrupting data (and other times working
fine) due to insufficient alignment.

It also means that we will be much more diligent about rejecting other
uses of these constructs that aren't safe.

It also means that we can now be more aggressive with the constructs
when we actually have guaranteed higher alignment without specializing
stuff. I'll be going through and cleaning up all the current overrides
of these traits which are no longer necessary.

Many thanks to Richard, David, and others who helped me get all of this
together.

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

8 years ago[ptr-traits] Refactor how PointerIntPair does its pointer manipulation
Chandler Carruth [Wed, 30 Dec 2015 03:56:19 +0000 (03:56 +0000)]
[ptr-traits] Refactor how PointerIntPair does its pointer manipulation
to isolate it in a dependent helper class.

Without doing this, we end up requiring all of the pointer traits the
moment you even define a PointerIntPair. That makes them *incredibly*
hard to use, for example you can't use them at all inside a class for
pointers to that class!

This change sinks all the logic into a helper template class that only
needs to be fully instantiated when *using* the PointerIntPair. We still
get compile-time checking, but it is deferred long enough to make
tradition out-of-line method definitions (or just the normal deferred
method body parsing) sufficient to handle cycling references.

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

8 years ago[ptr-traits] Add one more #include necessary to do strict alignment
Chandler Carruth [Wed, 30 Dec 2015 03:56:17 +0000 (03:56 +0000)]
[ptr-traits] Add one more #include necessary to do strict alignment
checking of pointers used in PointerIntPairs.

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

8 years agoRename MDValue* to Metadata* (NFC)
Teresa Johnson [Tue, 29 Dec 2015 23:00:22 +0000 (23:00 +0000)]
Rename MDValue* to Metadata* (NFC)

Renamed MDValue* to Metadata*, and MDValueToValIDMap to MetadataToIDs,
as per review for r255909.

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

8 years ago[RS4GC] Use DenseMap::count() instead of DenseMap::find()/DenseMap::end(). NFC.
Manuel Jacob [Tue, 29 Dec 2015 22:16:41 +0000 (22:16 +0000)]
[RS4GC] Use DenseMap::count() instead of DenseMap::find()/DenseMap::end().  NFC.

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

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Tue, 29 Dec 2015 22:11:50 +0000 (22:11 +0000)]
don't repeat function names in comments; NFC

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

8 years agouse auto with dyn_casted values; NFC
Sanjay Patel [Tue, 29 Dec 2015 22:00:37 +0000 (22:00 +0000)]
use auto with dyn_casted values; NFC

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

8 years ago[PlaceSafepoints] Assert that the gc.safepoint_poll function is present in the module.
Manuel Jacob [Tue, 29 Dec 2015 21:57:55 +0000 (21:57 +0000)]
[PlaceSafepoints] Assert that the gc.safepoint_poll function is present in the module.

If running the PlaceSafepoints pass on a module which doesn't have the
gc.safepoint_poll function without disabling entry and backedge safepoints,
previously the pass crashed with an obscure error because of a null pointer.
Now it fails the assert instead.

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

8 years agouse auto with dyn_casted values; NFC
Sanjay Patel [Tue, 29 Dec 2015 21:49:08 +0000 (21:49 +0000)]
use auto with dyn_casted values; NFC

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

8 years agofix formatting; NFC
Sanjay Patel [Tue, 29 Dec 2015 19:34:53 +0000 (19:34 +0000)]
fix formatting; NFC

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

8 years agouse range-based for-loops; NFCI
Sanjay Patel [Tue, 29 Dec 2015 19:14:23 +0000 (19:14 +0000)]
use range-based for-loops; NFCI

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

8 years agouse range-based for-loop; NFCI
Sanjay Patel [Tue, 29 Dec 2015 18:30:09 +0000 (18:30 +0000)]
use range-based for-loop; NFCI

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

8 years agoAdd command line options to force function/loop alignments.
Chad Rosier [Tue, 29 Dec 2015 18:18:07 +0000 (18:18 +0000)]
Add command line options to force function/loop alignments.

These are being added for testing purposes.
http://reviews.llvm.org/D15648

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

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Tue, 29 Dec 2015 18:14:06 +0000 (18:14 +0000)]
don't repeat function names in comments; NFC

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

8 years ago[JumpThreading] Fix opcode bonus in getJumpThreadDuplicationCost()
Geoff Berry [Tue, 29 Dec 2015 18:10:16 +0000 (18:10 +0000)]
[JumpThreading] Fix opcode bonus in getJumpThreadDuplicationCost()

The code that was meant to adjust the duplication cost based on the
terminator opcode was not being executed in cases where the initial
threshold was hit inside the loop.

Subscribers: mcrosier, llvm-commits

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

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

8 years agouse range-based for-loops; NFCI
Sanjay Patel [Tue, 29 Dec 2015 17:15:22 +0000 (17:15 +0000)]
use range-based for-loops; NFCI

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

8 years ago[MemoryBuiltins] Delete dead code [NFC]
Philip Reames [Tue, 29 Dec 2015 17:04:43 +0000 (17:04 +0000)]
[MemoryBuiltins] Delete dead code [NFC]

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

8 years ago[AVX512] add PSRLW Intrinsic
Michael Zuckerman [Tue, 29 Dec 2015 14:34:58 +0000 (14:34 +0000)]
[AVX512] add PSRLW Intrinsic

Fixing tab/space indentation.
Differential Revision: http://reviews.llvm.org/D15751

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

8 years ago[llvm-objdump] Mark noreturn function as such.
Davide Italiano [Tue, 29 Dec 2015 13:41:02 +0000 (13:41 +0000)]
[llvm-objdump] Mark noreturn function as such.

Match attribute in the header to make MSVC happy.

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

8 years ago[AVX512] add PSRLW Intrinsic
Michael Zuckerman [Tue, 29 Dec 2015 13:04:35 +0000 (13:04 +0000)]
[AVX512] add PSRLW Intrinsic

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

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

8 years ago[ADT] Teach alignment helpers to work correctly for abstract classes.
Chandler Carruth [Tue, 29 Dec 2015 09:52:41 +0000 (09:52 +0000)]
[ADT] Teach alignment helpers to work correctly for abstract classes.
This is necessary to use them as part of pointer traits and is generally
useful. I've added unit test coverage to isolate and ensure this works
correctly.

I'll watch the build bots to try to see if any compilers can't tolerate
this bit of magic (and much credit goes to Richard Smith for coming up
with this magical production!) but give a shout if you see issues.

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

8 years ago[ptr-traits] Provide a real MCFragment address for the sentinel instead
Chandler Carruth [Tue, 29 Dec 2015 09:32:18 +0000 (09:32 +0000)]
[ptr-traits] Provide a real MCFragment address for the sentinel instead
of casting the integer '4' to such a pointer. There is no reason to
expect '4' to be a portable or reliable pointer of this form. The only
reason this ever worked is because the PointerIntPair that this actually
gets used with has an artificially *low* presumed alignment that allowed
it to work. When the alignment of PointerIntPair is derived from the
actual type's alignment, the asserts start firing on this pointer. I'm
amazed we never managed to do anything that triggered the alignment
sanitizer with it, as this is just flat out UB.

If folks dislike this approach to providing a sentinel fragment address,
there are a myriad of other alternatives, suggestions welcome. But this
one has the distinct advantage of not requiring the friend dance of
ilist's sentinel (which I'll point out is *also* in play for
MCFragment!) and seems to be using a nicely provided facility in
MCFragment to establish just such dummy nodes.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Sink several in-body method definitions to be out-of-line
Chandler Carruth [Tue, 29 Dec 2015 09:24:42 +0000 (09:24 +0000)]
[ptr-traits] Sink several in-body method definitions to be out-of-line
inline definitions after the mutually recursive pair of types have been
defined. The two types mutually recurse specifically through
abstractions that require pointer traits which makes this kind of mutual
recursion especially tricky to get right in terms of ordering.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Sink a constructor definition to the .cpp file and add
Chandler Carruth [Tue, 29 Dec 2015 09:24:39 +0000 (09:24 +0000)]
[ptr-traits] Sink a constructor definition to the .cpp file and add
missing includes so that the pointee types for DenseMap pointer keys and
such are complete prior to us querying the pointer traits for them.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Add a bunch of includes to provide complete types that are
Chandler Carruth [Tue, 29 Dec 2015 09:06:21 +0000 (09:06 +0000)]
[ptr-traits] Add a bunch of includes to provide complete types that are
used in pointer dense map key types or in other ways that require
pointer traits.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler
Chandler Carruth [Tue, 29 Dec 2015 09:06:16 +0000 (09:06 +0000)]
[ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler
header to its own header, allowing users of fragments to have a narrower
header file, and avoid circular header dependencies when getting the
definition of MCSection prior to inspecting traits on MCSection
pointers.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

Note that this doesn't in any way change the design of MC, it is just
moving code around to allow the *header files* to be more fine grained.
Without this, it is impossible to get a complete type for MCSection
where it is needed.

If anyone would prefer a different slicing of the header files, I'm
happy to oblige of course. =]

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

8 years ago[MC] Fix the comment header for this header file. It was just
Chandler Carruth [Tue, 29 Dec 2015 09:06:10 +0000 (09:06 +0000)]
[MC] Fix the comment header for this header file. It was just
copy/pasted.

Happy for anyone to suggest a more precise or refined set of boilerplate
here, but the comments on the actual code seem descriptive and accurate.

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

8 years agoDe-virtualize mnemonicIsValid and remove from the base class. It's not called by...
Craig Topper [Tue, 29 Dec 2015 07:43:03 +0000 (07:43 +0000)]
De-virtualize mnemonicIsValid and remove from the base class. It's not called by any common code.

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