Commit Graph

67636 Commits

Author SHA1 Message Date
Eric Christopher
096eaf857e Two part patch:
First: refactor out the emission of entries into the .debug_loc section
into its own routine.

Second: add a new class ByteStreamer that can be used to either emit
using an AsmPrinter or hash using DIEHash the series of bytes that
would be emitted. Use this in all of the location emission routines
for the .debug_loc section.

No functional change intended outside of a few additional comments
in verbose assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203304 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:40:37 +00:00
Eric Christopher
a8d9fe2248 Add include guards and make public a few routines that add values
to the hash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:40:30 +00:00
Eli Bendersky
32643e3673 Remove unused method declaration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203301 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:19:10 +00:00
Adrian Prantl
d013411d96 Revert "Remove unnecessary check for Darwin. rdar://problem/16264854"
This breaks linux buildbots. Go figure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203300 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:18:23 +00:00
Adrian Prantl
1630c3cd32 Remove unnecessary check for Darwin. rdar://problem/16264854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203297 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:04:42 +00:00
David Blaikie
9623e46f00 DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functions
Suggested by Adrian Prantl in code review for r203187.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203296 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 22:00:56 +00:00
Benjamin Kramer
ba2a549016 [C++11] Revert uses of lambdas with array_pod_sort.
Looks like GCC implements the lambda->function pointer conversion differently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203294 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 21:52:38 +00:00
Benjamin Kramer
e1362f1ebd [C++11] Convert sort predicates into lambdas.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203288 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 21:35:39 +00:00
Eric Christopher
6a90a1e19c Fix up formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203286 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 21:27:42 +00:00
Tom Stellard
6cadd406cc R600/SI: Using SGPRs is illegal for instructions that read carry-out from VCC
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203281 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 20:12:39 +00:00
Tom Stellard
7e06370873 R600/SI: Custom lower i1 stores
These are sometimes created by the shrink to boolean optimization in the
globalopt pass.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203280 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 20:12:33 +00:00
Benjamin Kramer
adb294d284 [C++11] DwarfDebug: Turn single-use functors into lambdas.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203276 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 19:41:22 +00:00
Benjamin Kramer
3bfc4d8e13 [C++11] DwarfDebug: Use range-based for loops.
It has a lot of them with complex types. C++11 really shines here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203270 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 19:09:39 +00:00
Rafael Espindola
5abd4662b8 Don't avoid cfi instructions on the bg/p.
The integrated assembler now works for ppc. Since this was the last use of the
bg/p predicate and Hal says that it is now dead, drop the predicate too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203269 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 19:04:12 +00:00
Ted Kremenek
1a763b03eb Remove dead 'break' (dominated by 'return').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203267 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:54:08 +00:00
Ted Kremenek
af0c5ed7e5 Remove dead 'return'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:51:16 +00:00
David Majnemer
f5955c7dac MC: Use MachO::SectionType for MCSectionMachO::getType's return type
This is a straightfoward replacement, it makes debugging a little
easier.

This has no functional impact.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203264 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:49:54 +00:00
David Blaikie
5ba79a9952 DebugInfo: Refactor high_pc/low_pc construction into reusable function
For incoming improvements to inlined functions and lexical blocks
suggested by Adrian Prantl in review of r203187.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203263 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:49:45 +00:00
Nico Weber
f456d37c4f "Mac OS/X" -> "Mac OS X" spelling fixes for llvm.
Patch from Sean McBride <sean@rogue-research.com>!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203258 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:08:54 +00:00
David Blaikie
f7952d3a5f DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec
Code review feedback to r203187 from Oliver Stannard. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203256 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 18:04:24 +00:00
Duncan P. N. Exon Smith
ac4c4a8844 ARM: Make .unreq directives case-insensitive
Be case-insensitive when processing .unreq directives.

Patch by Lin Zuojian!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203251 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 16:16:52 +00:00
Richard Sandiford
122a970111 [SystemZ] Move sign_extend optimization to PerformDAGCombine
The target was marking SIGN_EXTEND as Custom because it wanted to optimize
certain sign-extended shifts.  In all other respects the extension is Legal,
so it'd be better to do the optimization in PerformDAGCombine instead.

No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203234 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 11:34:35 +00:00
Tim Northover
fa9e4b52f4 CodeGenPrep: sink extends of illegal types into use block.
This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

Patch by Manuel Jacob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203230 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 11:04:30 +00:00
Tim Northover
69d2b2aa5a InstCombine: form shuffles from wider range of insert/extractelements
Sequences of insertelement/extractelements are sometimes used to build
vectorsr; this code tries to put them back together into shuffles, but
could only produce a completely uniform shuffle types (<N x T> from two
<N x T> sources).

This should allow shuffles with different numbers of elements on the
input and output sides as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203229 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 10:24:44 +00:00
Ahmed Charles
cd68cff830 Change MCDisassembler::setSymbolizer to take unique_ptr by value.
This changes the interface to be more explicit that ownership is being
transferred.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 09:38:02 +00:00
Craig Topper
490750b0cf Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203221 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 09:26:53 +00:00
Craig Topper
9f998de891 [C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203220 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 09:26:03 +00:00
Alexey Volkov
177c1ef30d Enable FeatureFastUAMem for Silvermont processor
Differential Revision: http://llvm-reviews.chandlerc.com/D2982


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203218 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 09:03:49 +00:00
Alexey Volkov
adaa3e5760 Test commit
Removed whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203216 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 08:28:44 +00:00
David Majnemer
508e0c4d34 MC: Remove superfluous section attribute flag definitions
Summary:
llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same
definitions for the section flags.  Instead, grab the definitions out of
support.

No functionality change.

Reviewers: grosbach, Bigcheese, rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2998

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203211 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 07:36:05 +00:00
Rafael Espindola
7d7d99622f Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted:
* A temporary label was created.
* A single PROLOG_LABEL was created with it.
* A few MCCFIInstructions were created with the same label.

The semantics were that the cfi instructions were mapped to the PROLOG_LABEL
via the temporary label. The output position was that of the PROLOG_LABEL.
The temporary label itself was used only for doing the mapping.

The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to
one by holding an index into the CFI instructions of this function.

I did consider removing MMI.getFrameInstructions completelly and having
CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non
trivial constructors and destructors and are somewhat big, so the this setup
is probably better.

The net result is that we don't create temporary labels that are never used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203204 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 06:08:31 +00:00
Rafael Espindola
49dd5e831b Simplify. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203202 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 04:58:32 +00:00
Rafael Espindola
ab5573ef1b Simplify. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203199 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 04:45:03 +00:00
Karthik Bhat
70957b9c55 Allow constant folding of round function whenever feasible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203198 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 04:36:21 +00:00
David Blaikie
4b102527fa DebugInfo: Limit r203187 to non-darwin as lldb can't handle this yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203192 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 02:19:41 +00:00
Eric Christopher
d5c1fb9676 Move some dwarf emission routines to AsmPrinterDwarf.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203191 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 01:44:14 +00:00
Eric Christopher
0e42ae9d8b 80-column fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203190 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 01:44:12 +00:00
David Blaikie
34fa5640b8 DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc
This removes a relocation from each subprogram, reducing link times,
etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203187 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 01:30:55 +00:00
Saleem Abdulrasool
aa558a78b2 Reapply "MC: simplify object file selection for Windows"
That was overly aggressive in assuming that we could always assume COFF.  Some
of the tests assume that they will get ELF rather than COFF even on Windows
where the default is COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203176 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 23:02:15 +00:00
Rafael Espindola
b52d0c0d74 Remove shouldEmitUsedDirectiveFor.
Clang now uses llvm.compiler.used for these cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203174 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 22:47:08 +00:00
Ted Kremenek
93998f3a58 Remove unreachable 'return true' always dominated by 'return Error' or 'return false'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203171 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 22:13:17 +00:00
Argyrios Kyrtzidis
046c8e1a3a [Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only on unix.
Reid Kleckner pointed out that we can't use symbolic links on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203162 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:53:58 +00:00
Saleem Abdulrasool
4eb048a6f1 Support: split object format out of environment
This is a preliminary setup change to support a renaming of Windows target
triples.  Split the object file format information out of the environment into a
separate entity.  Unfortunately, file format was previously treated as an
environment with an unknown OS.  This is most obvious in the ARM subtarget where
the handling for macho on an arbitrary platform switches to AAPCS rather than
APCS (as per Apple's needs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203160 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:47:11 +00:00
Saleem Abdulrasool
5219b0f586 MC: simplify object file selection for Windows
Windows always uses COFF unless Windows ELF is in use.  Rather than checking if
Windows, MinGW, or Cygwin is being targeted, just check if the target OS is
windows and that it is not an ELF environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203159 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:47:03 +00:00
Andrea Di Biagio
e54158504f [X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.
This patch teaches the DAGCombiner how to fold a binary OR between two
shufflevector into a single shuffle vector when possible.

The rules are:
  1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1)
  2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2)

The DAGCombiner can take advantage of the fact that OR is commutative and
compute two possible shuffle masks (Mask1 and Mask2) for the resulting
shuffle node.

Before folding a dag according to either rule 1 or 2, DAGCombiner verifies
that the resulting shuffle mask is legal for the target.
DAGCombiner would firstly try to fold according to 1.; If not possible
then it will try to fold according to 2.
If both Mask1 and Mask2 are illegal then we conservatively don't fold
the OR instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203156 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:19:52 +00:00
Eric Christopher
27cfb7a41d Constify a few things with DotDebugLocEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 19:51:16 +00:00
Reid Kleckner
9035f6be4c MS asm: The initial dot in struct access is optional
Fixes PR18994.

Tests, once again, in that other repository.  =P

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203146 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 19:19:12 +00:00
Reid Kleckner
bbf1c8d24c Revert create_symbolic_link and both depending changes
This reverts commits r203136, r203137, and r203138.

This code doesn't build on Windows.  Even on Vista+, Windows requires
elevated privileges to create a symlink.  Therefore we can't use
symlinks in the compiler.  We'll have to find another approach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 19:07:35 +00:00
Eric Christopher
6c43168ce3 Move DIEEntry handling inside the main switch statement.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203142 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 18:59:42 +00:00
Argyrios Kyrtzidis
d25733bebc [Support/LockFileManager] Make the LockFileManager more robust against races.
There was a race where:
- The LockFileManager tries to own the lock file and fails.
- The other owner then releases and removes the lock file.
- The LockFileManager tries to read the owner info from the lock file but fails now.

In such a case have LockFileManager try to get ownership again, instead of error'ing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:37:10 +00:00