Commit Graph

100993 Commits

Author SHA1 Message Date
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
ec7ab53570 clang-format a bit of code to make the next patch easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203203 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 05:32:03 +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
Rafael Espindola
40e107d960 Add missing "[unnamed_addr]" to LangRef.rst#functions.
Patch by Manuel Jacob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203197 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 04:28:28 +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
David Blaikie
e2bb4f48ad DebugInfo: Refactor test to not rely on fixed DIE offsets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203186 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 01:19:31 +00:00
David Blaikie
63557bfbfb DebugInfo: Improve test to not depend on the specific naming of temporary symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203184 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 00:23:38 +00:00
Owen Anderson
83710e7716 Add iterator_range support for MachineInstr's operand and memoperand iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203181 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 00:08:57 +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
Rafael Espindola
e7147c1b57 Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 22:21:43 +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
Rafael Espindola
d0d94d6afb Fix warning about mismatched signs in comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203155 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:16:24 +00:00
Rafael Espindola
abb1fadc79 Fix the printing of n_type.
Despite the name, n_type contains the type of the symbol, but also if it is
extern or private extern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:13:41 +00:00
Rafael Espindola
7ed86b085e Use the existing N_STAB from the MachO namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203152 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 19:58:56 +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
Argyrios Kyrtzidis
7b95c0d529 [Support/LockFileManager] Use symbolic link for the lock file.
Hard links do not work on SMB network directories, and it causes us to fail
to build clang module files if the module cache is in such a directory.
rdar://15944959

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203137 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:37:04 +00:00
Argyrios Kyrtzidis
bd3f9c0b6b [Support/FileSystem] Introduce llvm::sys::fs::create_symbolic_link().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203136 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:36:46 +00:00
Matt Arsenault
161e3a80b2 R600: Fix extloads from i8 / i16 to i64.
This appears to only be working for global loads. Private
and local break for other reasons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203135 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:34:12 +00:00
Matt Arsenault
b4cd160bb9 R600/SI: Expand selects on vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:34:03 +00:00
Matt Arsenault
0c5c3b93d8 Fix missing C++ mode comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203133 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:33:58 +00:00
Matt Arsenault
38c18efe41 Teach lint about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203132 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 17:33:55 +00:00
Richard Osborne
d530a96701 [XCore] Add support for the "m" inline asm constraint.
Summary:
This provides support for CP and DP relative global accesses in inline
asm.

Reviewers: robertlytton

Reviewed By: robertlytton

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 16:37:48 +00:00
Rafael Espindola
371e07f1a9 Micro optimization: this code only needs to look at eh labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203127 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 16:31:40 +00:00
Chad Rosier
514d703ff6 [AArch64] This is a work in progress to provide a machine description
for the Cortex-A53 subtarget in the AArch64 backend.

This patch lays the ground work to annotate each AArch64 instruction
(no NEON yet) with a list of SchedReadWrite types. The patch also
provides the Cortex-A53 processor resources, maps those the the default
SchedReadWrites, and provides basic latency. NEON support will be added
in a subsequent patch with proper forwarding logic.

Verification was done by setting the pre-RA scheduler to linearize to
better gauge the effect of the MIScheduler. Even without modeling the
forward logic, the results show a modest improvement for Cortex-A53.

Reviewers: apazos, mcrosier, atrick
Patch by Dave Estes <cestes@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203125 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 16:04:00 +00:00
Richard Sandiford
abe768029b [SystemZ] Remove "virtual" from override methods
Also fix a couple of cases where "override" was missing.  No behavioural
change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203110 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 12:03:36 +00:00
Richard Sandiford
0c3682a402 [SystemZ] Use "auto" for cast results
No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203106 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 11:22:58 +00:00
Richard Sandiford
b653ed8545 [SystemZ] Use "for (auto" a bit
Just the simple cases for now.  There were a few knock-on changes of
MachineBasicBlock *s to MachineBasicBlock &s.  No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203105 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 11:00:15 +00:00
Richard Sandiford
9a1cd05a3d [SystemZ] Update namespace formatting to match current guidelines
No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203103 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 10:38:30 +00:00
Elena Demikhovsky
b0a3627443 AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them.
By Robert Khazanov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203098 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 08:45:30 +00:00
Elena Demikhovsky
f4623cee34 AVX-512: fixed comressed displacement - by Robert Khazanov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203096 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 08:15:35 +00:00
Yaron Keren
7bc835b7bf Cleaning up two more pre-Visual C++ 2012 build hacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203093 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 08:05:43 +00:00
Ahmed Charles
9959dffd51 Fix warnings about an variable only used in asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203089 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 06:35:46 +00:00
Ahmed Charles
7284c9795a Add <cstddef> for use of std::ptrdiff_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203086 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 06:13:54 +00:00
Ahmed Charles
acc8fb158e Fix break by qualifying ptrdiff_t with std::.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203084 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 06:05:26 +00:00
Ahmed Charles
f4ccd11075 Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 05:51:42 +00:00
David Blaikie
ca8b562f2d DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203082 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 05:47:39 +00:00