Commit Graph

150246 Commits

Author SHA1 Message Date
Craig Topper
fb0cb71701 [IR] Put a comment back on a function it belongs to. NFC
Looks like the function was moved to a different part of the class in December, but the comment didn't move with it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305139 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-10 06:58:22 +00:00
Craig Topper
95270b9920 [IR] Remove unnecessary override of operator new in ExtractValueInst. It's already inherited from UnaryInstruction. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305138 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-10 06:58:19 +00:00
Wei Ding
2d0aa2e9ba AMDGPU : Fix ISA Version Definitions.
Differential Revision: http://reviews.llvm.org/D28531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305137 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-10 03:53:19 +00:00
Andrew Kaylor
b8e9164d09 [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin
Differential Revision: https://reviews.llvm.org/D33737

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 23:18:11 +00:00
Sanjay Patel
a1e0378901 [PowerPC] add memcmp test with one constant operand and equality cmp; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 23:15:14 +00:00
Sanjay Patel
672c64a527 [CGP] add a reference to DataLayout in MemCmpExpansion; NFCI
We're currently passing endian-ness around as a param (and not uniformly),
so this eliminates the need for that. I'd like to add a constant fold
call too, and that requires a DL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305129 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 23:01:05 +00:00
I-Jui (Ray) Sung
9ac60a697c [AArch64] Add fallback in FastISel fp16 conversions
Summary:
- Fix assertion failures on F16 to/from int types in FastISel by falling
  back to regular ISel
- Add a testcase of various conversion cases with FastISel (-O0)

Reviewers: kristof.beyls, jmolloy, SjoerdMeijer

Reviewed By: SjoerdMeijer

Subscribers: SjoerdMeijer, llvm-commits, srhines, pirama, aemerson, rengolin, javed.absar, kristof.beyls

Differential Revision: https://reviews.llvm.org/D33734

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305127 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 22:40:50 +00:00
Vassil Vassilev
7bdba100fb Enable c++1z experimental builds.
Patch by David Abdurachmanov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305123 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 22:09:57 +00:00
Eugene Zelenko
af1531a5be [Support] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 21:41:54 +00:00
Craig Topper
24ed17e240 [LVI] Fix spelling error in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305115 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 21:21:17 +00:00
Craig Topper
f12aebdca5 [LVI] Const correct and rename the LVILatticeVal parameter to getPredicateResult. NFC
Previously it was non-const reference named Result which would tend to make someone think that it was an outparam when really its an input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305114 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 21:18:16 +00:00
Zachary Turner
bb67f7f534 [pdb] Support CoffSymbolRVA debug subsection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 20:46:52 +00:00
Yaxun Liu
6862a2be05 [SROA] Fix APInt size when load/store have different address space
Currently there is a bug in SROA::presplitLoadsAndStores which causes assertion in
GEPOperator::accumulateConstantOffset.

Basically it does not consider the situation that the pointer operand of load or store
may be in a non-zero address space and its size may be different from the size of
a pointer in address space 0.

This patch fixes assertion when compiling Blender Cycles kernels for amdgpu backend.

Diffferential Revision: https://reviews.llvm.org/D33298


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305107 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 20:46:29 +00:00
Zachary Turner
cfb1356863 Rename llvm-pdbdump -> llvm-pdbutil.
This is to reflect the evolving nature of the tool as being
useful for more than just dumping PDBs, as it can do many other
things.

Differential Revision: https://reviews.llvm.org/D34062

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305106 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 20:46:17 +00:00
Francis Ricci
1805055420 [ADT] Make iterable SmallVector template overrides more specific
Summary:
This prevents the iterator overrides from being selected in
the case where non-iterator types are used as arguments, which
is of particular importance in cases where other overrides with
identical types exist.

Reviewers: dblaikie, bkramer, rafael

Subscribers: llvm-commits, efriedma

Differential Revision: https://reviews.llvm.org/D33919

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 20:31:53 +00:00
Keno Fischer
5d860d251e [Sink] Fix predicate in legality check
Summary:
isSafeToSpeculativelyExecute is the wrong predicate to use here.
All that checks for is whether it is safe to hoist a value due to
unaligned/un-dereferencable accesses. However, not only are we doing
sinking rather than hoisting, our concern is that the location
we're loading from may have been modified. Instead forbid sinking
any load across a critical edge.

Reviewers: majnemer

Subscribers: davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D33179

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305102 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 19:31:10 +00:00
Benjamin Kramer
a69f40df77 I guess /dev/null is a bad idea on windows. Use a temp file instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 19:18:07 +00:00
Stanislav Mekhanoshin
525f44047e [AMDGPU] Add intrinsics for alignbit and alignbyte instructions
Differential Revision: https://reviews.llvm.org/D34046

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305098 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 19:03:00 +00:00
Benjamin Kramer
283fd3fff8 [llvm-cvtres] Don't polute the test directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305097 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 18:44:10 +00:00
Zachary Turner
248cabd1f5 Fix -Wreorder-fields warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 18:04:02 +00:00
Zachary Turner
4b665d2445 Allow VarStreamArray to use stateful extractors.
Previously extractors tried to be stateless with any additional
context information needed in order to parse items being passed
in via the extraction method.  This led to quite cumbersome
implementation challenges and awkwardness of use.  This patch
brings back support for stateful extractors, making the
implementation and usage simpler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305093 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 17:54:36 +00:00
Eric Beckmann
3028aaffc2 Implement COFF emission for parsed Windows Resource ( .res) files.
Summary: Add the WindowsResourceCOFFWriter class for producing the final COFF after all parsing is done.

Reviewers: hiraditya!, zturner, ruiu

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D34020

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305092 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 17:34:30 +00:00
Simon Pilgrim
727659d0c8 [X86][SSE] Add support for PACKSS nodes to faux shuffle extraction
If the inputs won't saturate during packing then we can treat the PACKSS as a truncation shuffle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 17:29:52 +00:00
Vassil Vassilev
1fb874b24c We do not need google test utils if we disabled LLVM_INCLUDE_TESTS
Fixes embedded uses of llvm where google testing framework is provided outside.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305088 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 16:37:39 +00:00
Craig Topper
c65472c75f [LazyValueInfo] Don't run the more complex predicate handling code for EQ and NE in getPredicateResult
Summary:
Unless I'm mistaken, the special handling for EQ/NE should cover everything and there is no reason to fallthrough to the more complex code. For that matter I'm not sure there's any reason to special case EQ/NE other than avoiding creating temporary ConstantRanges.

This patch moves the complex code into an else so we only do it when we are handling a predicate other than EQ/NE.

Reviewers: anna, reames, resistor, Farhana

Reviewed By: anna

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D34000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305086 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 16:16:20 +00:00
Krzysztof Parzyszek
7ed47635a1 [Hexagon] Fixes and updates to the selection patterns
- Add some missing patterns.
- Use C4_cmplte in branch patterns.
- Fix signedness of immediate operand in M2_accii.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 15:26:21 +00:00
Zvi Rackover
37f71ef58c SelectionDAG: Remove deleted nodes from legalized set to avoid clash with newly created nodes
Summary:
During DAG legalization loop in SelectionDAG::Legalize(),
bookkeeping of the SDNodes that were already legalized is implemented
with SmallPtrSet (LegalizedNodes). This kind of set stores only pointers
to objects, not the objects themselves. Unfortunately, if SDNode is
deleted during legalization for some reason, LegalizedNodes set is not
informed about this fact. This wouldn’t be so bad, if SelectionDAG wouldn’t reuse
space deallocated after deletion of unused nodes, for creation of new
ones. Because of this, new nodes, created during legalization often can
have pointers identical to ones that have been previously legalized,
added to the LegalizedNodes set, and deleted afterwards. This in turn
causes, that newly created nodes, sharing the same pointer as deleted
old ones, are present in LegalizedNodes *already at the moment of
creation*, so we never call Legalize on them.
The fix facilitates the fact, that DAG notifies listeners about each
modification. I have registered DAGNodeDeletedListener inside
SelectionDAG::Legalize, with a callback function that removes any
pointer of any deleted SDNode from the LegalizedNodes set. With this
modification, LegalizeNodes set does not contain pointers to nodes that
were deleted, so newly created nodes can always be inserted to it, even
if they share pointers with old deleted nodes.

Patch by pawel.szczerbuk@intel.com

The issue this patch addresses causes failures in an out-of-tree target,
and i was not able to create a reproducer for an in-tree target, hence
there is no test-case.

Reviewers: delena, spatel, RKSimon, hfinkel, davide, qcolombet

Reviewed By: delena

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33891

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:53:45 +00:00
Simon Dardis
00daab518d Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns"
By target hookifying getRegisterType, getNumRegisters, getVectorBreakdown,
backends can request that LLVM to scalarize vector types for calls
and returns.

The MIPS vector ABI requires that vector arguments and returns are passed in
integer registers. With SelectionDAG's new hooks, the MIPS backend can now
handle LLVM-IR with vector types in calls and returns. E.g.
'call @foo(<4 x i32> %4)'.

Previously these cases would be scalarized for the MIPS O32/N32/N64 ABI for
calls and returns if vector types were not legal. If vector types were legal,
a single 128bit vector argument would be assigned to a single 32 bit / 64 bit
integer register.

By teaching the MIPS backend to inspect the original types, it can now
implement the MIPS vector ABI which requires a particular method of
scalarizing vectors.

Previously, the MIPS backend relied on clang to scalarize types such as "call
@foo(<4 x float> %a) into "call @foo(i32 inreg %1, i32 inreg %2, i32 inreg %3,
i32 inreg %4)".

This patch enables the MIPS backend to take either form for vector types.

The previous version of this patch had a "conditional move or jump depends on
uninitialized value".

Reviewers: zoran.jovanovic, jaydeep, vkalintiris, slthakur

Differential Revision: https://reviews.llvm.org/D27845


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:37:08 +00:00
Sanjay Patel
9242e2b82f [SimplifyLibCalls] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:22:03 +00:00
Sanjay Patel
c590cff5a1 [ValueTracking] fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:21:18 +00:00
David Stuttard
00d555d436 [AMDGPU] Fix for issue in alloca to vector promotion pass
Summary:
Alloca promotion pass not dealing with non-canonical input

Added some additional checks so the pass simply backs-off forms it can't deal with (non-canonical)

Also added some test cases in non-canonical form to check that it no longer crashes

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tpr, t-tye

Differential Revision: https://reviews.llvm.org/D31710

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305079 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:16:22 +00:00
Javed Absar
1ad151d432 [ARM] Custom machine-scheduler. NFCI.
This patch creates a customised machine-scheduler for ARM targets,
so that subsequently DAG mutations etc can be added.
Reviewed by: hahn, rengolin, rovka. 
Differential Revision: https://reviews.llvm.org/D34039



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:07:21 +00:00
Nirav Dave
d73d6a2ee6 [MC] Fix compiler crash in AsmParser::Lex
When an empty comment is present in an assembly file, the compiler will crash because it checks the first character for '\n' or '\r'.
The fix consists of also checking if the string is empty before accessing the *front* method of the StringRef.
A test is included for the x86 target, but this issue is reproducible with other targets as well.

Patch by Alexandru Guduleasa!

Reviewers: niravd, grosbach, llvm-commits

Reviewed By: niravd

Differential Revision: https://reviews.llvm.org/D33993

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 14:04:03 +00:00
Krzysztof Parzyszek
b43da93f75 [Hexagon] Add LLVM header to HexagonPatterns.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 13:30:58 +00:00
Serge Rogatch
30c75827fc [XRay] Fix computation of function size subject to XRay threshold
Summary:
Currently XRay compares its threshold against `Function::size()` . However, `Function::size()` returns the number of basic blocks (as I understand, such as cycle bodies, if/else bodies, switch-case bodies, etc.), rather than the number of instructions.

The name of the parameter `-fxray-instruction-threshold=N`, as well as XRay documentation at http://llvm.org/docs/XRay.html , suggests that instructions should be counted, rather than the number of basic blocks.

I see two options:
1. Count the number of MachineInstr`s in MachineFunction : this gives better  estimate for the number of assembly instructions on the target. So a user can check in disassembly that the threshold works more or less correctly.
2. Count the number of Instruction`s in a Function : AFAIK, this gives correct number of IR instructions, which the user can check in IR listing. However, this number may be far (several times for small functions) from the number of assembly instructions finally emitted.

Option 1 is implemented in this patch because I think that having the closer estimate for the number of assembly instructions emitted is more important than to have a clear definition of the metric.

Reviewers: dberris, rengolin

Reviewed By: dberris

Subscribers: llvm-commits, iid_iunknown

Differential Revision: https://reviews.llvm.org/D34027

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 13:23:23 +00:00
Nirav Dave
00d5002e51 Prevent RemoveDeadNodes from deleted already deleted node.
This prevents against assertion errors like PR32659 which occur from a
replacement deleting a node after it's been added to the list argument
of RemoveDeadNodes. The specific failure from PR32659 does not
currently happen, but it is still potentially possible. The underlying
cause is that the callers of the change dfunction builds up a list of
nodes to delete after having moved their uses and it possible that a
move of a later node will cause a previously deleted nodes to be
deleted.

Reviewers: bkramer, spatel, davide

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305070 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 12:57:35 +00:00
Oliver Stannard
14310e3851 [ARM] Add scheduling info for VFMS
The scalar VFMS instructions did not have scheduling information attached (but
VFMA did), which was causing assertion failures with the Cortex-A57 scheduling
model and -fp-contract=fast.

Differential Revision: https://reviews.llvm.org/D34040



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 09:19:09 +00:00
NAKAMURA Takumi
1a8e4006cb llvm/test/DebugInfo/PDB/pdbdump-debug-subsections.test: Try to unbreak r305043.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 08:50:39 +00:00
Stefan Maksimovic
7bb799bb69 Test commit: remove whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305059 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 07:57:05 +00:00
David Blaikie
5dc796dd9c bugpoint: disabling symbolication of bugpoint-executed programs
Initial implementation - needs similar work/testing for other tools
bugpoint invokes (llc, lli I think, maybe more).

Alternatively (as suggested by chandlerc@) an environment variable could
be used. This would allow the option to pass transparently through user
scripts, pass to compilers if they happened to be LLVM-ish, etc.

I worry a bit about using cl::opt in the crash handling code - LLVM
might crash early, perhaps before the cl::opt is properly initialized?
Or at least before arguments have been parsed?

 - should be OK since it defaults to "pretty", so if the crash is very
 early in opt parsing, etc, then crash reports will still be symbolized.

I shyed away from doing this with an environment variable when I
realized that would require copying the existing environment and
appending the env variable of interest. But it seems there's no existing
LLVM API for accessing the environment (even the Support tests for
process launching have their own ifdefs for getting the environment). It
could be added, but seemed like a higher bar/untested codepath to
actually add environment variables.

Most importantly, this reduces the runtime of test/BugPoint/metadata.ll
in a split-dwarf Debug build from 1m34s to 6.5s by avoiding a lot of
symbolication. (this wasn't a problem for non-split-dwarf builds only
because the executable was too large to map into memory (due to bugpoint
setting a 400MB memory (including address space - not sure why? Going to
remove that) limit on the child process) so symbolication would fail
fast & wouldn't spend all that time parsing DWARF, etc)

Reviewers: chandlerc, dannyb

Differential Revision: https://reviews.llvm.org/D33804

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305056 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 07:29:03 +00:00
Serguei Katkov
7e14c3da2c [IndVars] Add an option to be able to disable LFTR
This change adds an option disable-lftr to be able to disable Linear Function Test Replace optimization.
By default option is off so current behavior is not changed.

Reviewers: reames, sanjoy, wmi, andreadb, apilipenko
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D33979


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305055 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 06:11:59 +00:00
George Burgess IV
9276050d30 [LoopVectorize] Don't preserve nsw/nuw flags on shrunken ops.
If we're shrinking a binary operation, it may be the case that the new
operations wraps where the old didn't. If this happens, the behavior
should be well-defined. So, we can't always carry wrapping flags with us
when we shrink operations.

If we do, we get incorrect optimizations in cases like:

void foo(const unsigned char *from, unsigned char *to, int n) {
  for (int i = 0; i < n; i++)
    to[i] = from[i] - 128;
}

which gets optimized to:

void foo(const unsigned char *from, unsigned char *to, int n) {
  for (int i = 0; i < n; i++)
    to[i] = from[i] | 128;
}

Because:
- InstCombine turned `sub i32 %from.i, 128` into
  `add nuw nsw i32 %from.i, 128`.
- LoopVectorize vectorized the add to be `add nuw nsw <16 x i8>` with a
  vector full of `i8 128`s
- InstCombine took advantage of the fact that the newly-shrunken add
  "couldn't wrap", and changed the `add` to an `or`.

InstCombine seems happy to figure out whether we can add nuw/nsw on its
own, so I just decided to drop the flags. There are already a number of
places in LoopVectorize where we rely on InstCombine to clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 03:56:15 +00:00
David Blaikie
d38ff39924 Inliner: Don't touch indirect calls
Other comments/implications are that this isn't intended behavior (nor
perserved/reimplemented in the new inliner) & complicates fixing the
'inlining' of trivially dead calls without consulting the cost function
first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305052 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 03:29:20 +00:00
Rui Ueyama
f22657670b Fix -Wunused-variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305051 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 03:26:45 +00:00
Craig Topper
477e07214c [llvm-pdbdump] Fix -Wpessimizing-move warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 03:25:57 +00:00
Craig Topper
d93348f701 [InstCombine] Pass a proper context instruction to all of the calls into InstSimplify
Summary: This matches the behavior we already had for compares and makes us consistent everywhere.

Reviewers: dberlin, hfinkel, spatel

Reviewed By: dberlin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33604

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305049 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 03:21:29 +00:00
Bob Haarman
67d04e8fdf [codeview] use 32-bit integer for RelocOffset in DebugLinesSubsection
Summary:
RelocOffset is a 32-bit value, but we previously truncated it to 16 bits.

Fixes PR33335.

Reviewers: zturner, hiraditya!

Reviewed By: zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33968

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 01:18:10 +00:00
Zachary Turner
680d997aa7 [pdb] Don't crash on unknown debug subsections.
More and more unknown debug subsection kinds are being discovered
so we should make it possible to dump these and display the
bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305041 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 00:53:59 +00:00
Saleem Abdulrasool
e6be41f2a8 sink DebugCompressionType into MC for exposing to clang
This is a preparatory change to expose the debug compression style to
clang.  It requires exposing the enumeration and passing the actual
value through to the backend from the frontend in actual value form
rather than a boolean that selects the GNU style of debug info
compression.

Minor tweak to the ELF Object Writer to use a variable for re-used
values.  Add an assertion that debug information format is one of the
two currently known types if debug information is being compressed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305038 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 00:40:19 +00:00
Zachary Turner
68ca30aa36 [CodeView] Support remaining debug subsection types
This adds support for Symbols, StringTable, and FrameData subsection
types.  Even though these subsections rarely if ever appear in a PDB
file (they are usually in object files), there's no theoretical reason
why they *couldn't* appear in a PDB.  The real issue though is that in
order to add support for dumping and writing them (which will be useful
for object files), we need a way to test them.  And since there is no
support for reading and writing them to / from object files yet, making
PDB support them is the best way to both add support for the underlying
format and add support for tests at the same time.  Later, when we go
to add support for reading / writing them from object files, we'll need
only minimal changes in the underlying read/write code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-09 00:28:08 +00:00