Commit Graph

62022 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
4e91fa3834 [Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the thread-local "CurrentContext"
in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread.

When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable
for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread.

The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up
crash-recovery for its parent.

A test for this will be added in the clang repository.
rdar://14204560

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:53:45 +00:00
Bill Wendling
228546b8cb This is now a duplicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184376 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:16:33 +00:00
Bill Wendling
59aa540738 Make the comparison operators non-member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184373 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:09:25 +00:00
Bill Wendling
0c92f2a1c7 Don't pass in the TargetInstrInfo into the register info object. It doesn't use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184369 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:59:00 +00:00
David Blaikie
0159ae4295 DebugInfo: PR14763/r183329 correct the location of indirect parameters
We had been papering over a problem with location info for non-trivial
types passed by value by emitting their type as references (this caused
the debugger to interpret the location information correctly, but broke
the type of the function). r183329 corrected the type information but
lead to the debugger interpreting the pointer parameter as the value -
the debug info describing the location needed an extra dereference.

Use a new flag in DIVariable to add the extra indirection (either by
promoting an existing DW_OP_reg (parameter passed in a register) to
DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n
(parameter passed on the stack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184368 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:55:13 +00:00
David Blaikie
0812304ad8 Spell correct (s/begining/beginning/)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184362 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:42:05 +00:00
David Blaikie
3df7d2f70b llvm-dwarfdump: Add support for dumping the .debug_loc section
This is a basic implementation - we still don't have any support (that I
know of) for dumping DWARF expressions in a meaningful way, so the
location information itself is just printed as a sequence of bytes as we
do elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184361 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:37:13 +00:00
Bill Wendling
ba54bca472 Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:36:55 +00:00
Ulrich Weigand
4df4bccc71 [MC/DWARF] Generate multiple .debug_line entries for adjacent .loc directives
The compiler occasionally generates multiple .loc directives in a row
(at the same instruction address).  These need to be transformed into
multple actual .debug_line table entries, since they are used to signal
certain information to the debugger (e.g. if the opening brace of a
function body is on the same line as the declaration).

The MCAsmStreamer version of EmitDwarfLocDirective handles this
correctly by emitting a .loc directive every time it is called.
However, the MCObjectStream version simply defaults to recording
the information and emitting only a single table entry later,
e.g. when EmitInstruction is called.

This patch introduces a MCAsmStreamer::EmitDwarfLocDirective
version that emits a line table entry for a .loc directive
that may already be pending before recording the new directive.
(This is similar to how this is handled in GNU as.)

With this patch (and the code alignment factor patch) applied,
I'm now getting identical DWARF .debug sections for all test-suite
object files on PowerPC for the internal and the external assembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:27:27 +00:00
Michael Gottesman
07969dc8ae [APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
Turns out all the references were in llvm and not in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:23:18 +00:00
Bill Wendling
f9fd58a44b Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:07:11 +00:00
Aaron Ballman
4655485eb7 Modified the implementation of fs::GetUniqueID on Windows such that it actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:03:50 +00:00
Bill Wendling
ea44281d5d Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:51:24 +00:00
Bill Wendling
d626d33246 Don't cache the TLI object since we have access to it through TargetMachine already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:32:16 +00:00
Ahmed Bougacha
7ab184a2a1 Allow creation of single-byte MCAtoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:18:59 +00:00
Matt Arsenault
ad966ea7a8 Move StructurizeCFG out of R600 to generic Transforms.
Register it with PassManager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:18:24 +00:00
Quentin Colombet
5a2fb058d3 LSR: Fix the parameters used to compute the scaling factor cost.
Prior to this change, the considered addressing modes may be invalid since the
maximum and minimum offsets were not taking into account.
This was causing an assertion failure.

The added test case exercices that behavior.

<rdar://problem/14199725> Assertion failed: (CurScaleCost >= 0 && "Legal
addressing mode has an illegal cost!")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184341 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 19:59:41 +00:00
Nadav Rotem
80a6d6526c SLPVectorizer: handle scalars that are extracted from vectors (using ExtractElementInst).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 17:33:16 +00:00
Nadav Rotem
7d180ac7b6 SLPVectorizer: start constructing chains at stores that are not power of two.
The type <3 x i8> is a common in graphics and we want to be able to vectorize it.

This changes accelerates bullet by 12% and 471_omnetpp by 5%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184317 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 15:57:29 +00:00
Rafael Espindola
7c8397081c Remove Path::getDirectoryContents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 15:32:37 +00:00
Rafael Espindola
ca0984cb86 Remove Path::isObjectFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 14:25:38 +00:00
Rafael Espindola
f6f3be69d8 Remove Path::canExecute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 13:25:31 +00:00
Vladimir Medic
dd5fe2ffc6 The RenderMethod field in RegisterOperand class sets the name of the method on the target specific operand to call to add the target specific operand to an MCInst. This patch defines RenderMethod for mips RegisterOperand classes and removes redundant code from MipsAsmParser.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184292 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 10:14:36 +00:00
NAKAMURA Takumi
f9326c248a MachOUniversal.cpp: Fix abuse of Twine. It would be sufficient to use std::string instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 09:55:05 +00:00
Michael Gottesman
15c6aa9147 Fixed comment typo that causes the given comment to actually make sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184286 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 07:34:21 +00:00
Nadav Rotem
eb30e5115e SLPVectorizer: vectorize compares and selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 05:49:52 +00:00
Nadav Rotem
69466952ed Document the return value and fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184281 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 05:47:33 +00:00
Sean Silva
ea94e114b4 [yaml2obj][ELF] Support ELFOSABI_* enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 00:55:28 +00:00
Sean Silva
5ba1225fb0 [yaml2obj][ELF] Support st_info through Binding and Type YAML keys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 00:11:59 +00:00
Matt Arsenault
70a3dc1bc2 Use GetUnderlyingObject instead of custom function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184261 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 23:37:58 +00:00
Sean Silva
afcf60fe15 [yaml2obj][ELF] Rudimentary symbol table support.
Currently, we only output the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 23:14:03 +00:00
Jim Grosbach
a95e3091eb ARM: Add optional datatype suffix to NEON mvn asm syntax.
rdar://14194152

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184244 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 21:49:21 +00:00
Bill Wendling
f2db8dfa84 We want a string representation of the attribute, not the kind as a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 21:27:00 +00:00
Rafael Espindola
1fbf3a3aca Remove Path::canWrite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 21:10:03 +00:00
Rafael Espindola
68ba1825fc Add a can_write function to PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:56:38 +00:00
Michael Gottesman
41502e1af7 [ARMTargetLowering] ARMISD::{SUB,ADD}{C,E} second result is a boolean implying that upper bits are always 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184231 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:49:45 +00:00
Michael Gottesman
8493edfb4b Converted an overly aggressive assert to a conditional check in AddCombineTo64bitMLAL.
Said assert assumes that ADDC will always have a glue node as its second
argument and is checked before we even know that we are actually performing the
relevant MLAL optimization. This is incorrect since on ARM we *CAN* codegen ADDC
with a use list based second argument. Thus to have both effects, I converted
the assert to a conditional check which if it fails we do not perform the
optimization.

In terms of tests I can not produce an ADDC from the IR level until I get in my
multiprecision optimization patch which is forthcoming. The tests for said patch
would cause this assert to fail implying that said tests will provide the
relevant tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184230 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:49:40 +00:00
Rafael Espindola
f3426a482e Remove unused Path::canRead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:42:25 +00:00
Nadav Rotem
ef2d9e3194 Fix 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184228 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:41:52 +00:00
Kevin Enderby
bf811d602d Change the arm assembler to support this from the v7c spec:
"When assembling to the ARM instruction set, the .N qualifier produces
an assembler error and the .W qualifier has no effect."

In the pre-matcher handler in the asm parser the ".w" (wide) qualifier 
when in ARM mode is now discarded. And an error message is now
produced when the ".n" (narrow) qualifier is used in ARM mode.

Test cases for these were added.

rdar://14064574


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184224 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:19:24 +00:00
Quentin Colombet
a3fb49cd85 During SelectionDAG building explicitly set a node to constant zero when the
value is zero.
This allows optmizations to kick in more easily.
Fix some test cases so that they remain meaningful (i.e., not completely dead
coded) when optimizations apply.

<rdar://problem/14096009> superfluous multiply by high part of zero-extended
value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184222 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:14:39 +00:00
Jack Carter
571dd98ea4 Mips ELF: Mark object file as ABI compliant
When producing objects that are abi compliant we are 
marking neither the object file nor the assembly file
correctly and thus generate warnings. 

We need to set the EF_CPIC flag in the ELF header when
generating direct object.

Note that the warning is only generated when compiling without PIC.

When compiling with clang the warning will be suppressed by supplying:

 -Wa,-mno-shared -Wa,-call_nonpic

Also the following directive should also be added:

	.option	pic0

when compiling without PIC,  This eliminates the need for supplying:

  -mno-shared -call_nonpic

on the assembler command line.

Patch by Douglas Gilmore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184220 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 19:47:15 +00:00
Rafael Espindola
2e0f70bdd8 Remove uniqueID from PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184219 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 19:46:19 +00:00
Rafael Espindola
605510d16e Add a GetUniqueID that will replace the uniqueID of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 19:34:49 +00:00
David Blaikie
13769fa725 Reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 18:03:17 +00:00
Stefanus Du Toit
23306deb92 Add support for encoding the HLE XACQUIRE and XRELEASE prefixes.
For decoding, keep the current behavior of always decoding these as their REP
versions. In the future, this could be improved to recognize the cases where
these behave as XACQUIRE and XRELEASE and decode them as such.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184207 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 17:08:10 +00:00
Rafael Espindola
8ee23f00c7 Add a version of unique_file that return just the file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184206 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 17:01:00 +00:00
Nadav Rotem
5cb84896bc Scan the successor blocks and use the PHI nodes as a hint for possible chain roots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184201 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 15:58:05 +00:00
Nadav Rotem
7a0fad9a86 Add a return value to make this function more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184200 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 15:57:12 +00:00
Alexey Samsonov
9c22f87b13 Basic support for parsing Mach-O universal binaries in LLVMObject library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 15:03:28 +00:00