Commit Graph

88462 Commits

Author SHA1 Message Date
Benjamin Kramer
08219ea2b4 X86: Add patterns for X86ISD::VSEXT in registers.
Those can occur when something between the sextload and the store is on the same
chain and blocks isel. Fixes PR14887.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172353 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13 11:37:04 +00:00
Nadav Rotem
b6db95f42b Fix PR14547. Handle induction variables of small sizes smaller than i32 (i8 and i16).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13 07:56:29 +00:00
Michael Gottesman
981308cffb [ObjCARC] Even more debug messages!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13 07:47:32 +00:00
Michael Gottesman
cf14005185 [ObjCARC] More debug messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13 07:00:51 +00:00
Chandler Carruth
eab0ba03cf Fix an editor goof in r171738 that Bill spotted. He may even have a test
case, but looking at the diff this was an obviously unintended change.

Thanks for the careful review Bill! =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 23:46:04 +00:00
Tim Northover
7cd32479b0 Use more canonical exception-handling link in docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 19:54:21 +00:00
Benjamin Kramer
4dc478308f When lowering an inreg sext first shift left, then right arithmetically.
Shifting right two times will only yield zero. Should fix
SingleSource/UnitTests/SignlessTypes/factor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 19:06:44 +00:00
NAKAMURA Takumi
edaf85606d MipsDisassembler.cpp: Prune DecodeHWRegs64RegisterClass() to suppress a warning. [-Wunused-function]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172319 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 15:37:00 +00:00
Benjamin Kramer
0813589f72 GlobalOpt: Avoid jump on uninitialized value.
Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172318 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 15:34:31 +00:00
NAKAMURA Takumi
a96a96cefa MipsAsmParser: Try to unbreak tests to add extra check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172315 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 15:19:10 +00:00
Benjamin Kramer
8591fa38e6 Add a unit test to verifies that attribute uniquing works so it doesn't break again.
The folding set details can be subtle and broke twice in the last couple of weeks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172313 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 14:13:45 +00:00
Tim Northover
7aa3080a85 Fix broken links around Itanium C++ ABI in documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172312 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 12:38:54 +00:00
Michael Gottesman
e7a715f61e Fixed debug message in ObjCARC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 03:45:49 +00:00
Michael Gottesman
0d3582b1d1 Fixed a few debug messages in ObjCARC and added one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 02:57:16 +00:00
Bob Wilson
6f4ccaf287 Fix quoting problems from my previous change. <rdar://problem/13001651>
I give up trying to get all of the settings into COMMON_MAKEFLAGS, so just
do the easy thing and repeat the ones with interesting quoting issues
in each make command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172296 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 02:31:42 +00:00
Michael Gottesman
0e385450fc Fixed bug in ObjCARC where we were changing a call from objc_autoreleaseRV => objc_autorelease but were not updating the InstructionClass to IC_Autorelease.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172288 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 01:25:19 +00:00
Michael Gottesman
e8c161a924 Fixed a bug where we were tail calling objc_autorelease causing an object to not be placed into an autorelease pool.
The reason that this occurs is that tail calling objc_autorelease eventually
tail calls -[NSObject autorelease] which supports fast autorelease. This can
cause us to violate the semantic gaurantees of __autoreleasing variables that
assignment to an __autoreleasing variables always yields an object that is
placed into the innermost autorelease pool.

The fix included in this patch works by:

1. In the peephole optimization function OptimizeIndividualFunctions, always
remove tail call from objc_autorelease.
2. Whenever we convert to/from an objc_autorelease, set/unset the tail call
keyword as appropriate.

*NOTE* I also handled the case where objc_autorelease is converted in
OptimizeReturns to an autoreleaseRV which still violates the ARC semantics. I
will be removing that in a later patch and I wanted to make sure that the tree
is in a consistent state vis-a-vis ARC always.

Additionally some test cases are provided and all tests that have tail call marked
objc_autorelease keywords have been modified so that tail call has been removed.

*NOTE* One test fails due to a separate bug that I am going to commit soon. Thus
I marked the check line TMP: instead of CHECK: so make check does not fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172287 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 01:25:15 +00:00
Jack Carter
ec3199f675 This patch tackles the problem of parsing Mips
register names in the standalone assembler llvm-mc.

Registers such as $A1 can represent either a 32 or
64 bit register based on the instruction using it.
In addition, based on the abi, $T0 can represent different
32 bit registers.


The problem is resolved by the Mips specific AsmParser 
td definitions changing to work together. Many cases of
RegisterClass parameters are now RegisterOperand.


Contributer: Vladimir Medic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 01:03:14 +00:00
Jakob Stoklund Olesen
6d6132986d Limit the search space in RAGreedy::tryEvict().
When tryEvict() is looking for a cheaper register in the allocation
order, skip the tail of too expensive registers when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172281 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 00:57:44 +00:00
Jakob Stoklund Olesen
c7a275245f Precompute some information about register costs.
Remember the minimum cost of the registers in an allocation order and
the number of registers at the end of the allocation order that have the
same cost per use.

This information can be used to limit the search space for
RAGreedy::tryEvict() when looking for a cheaper register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 00:54:59 +00:00
Eli Bendersky
b2f0b595a3 Stop hiding the interface-exposed EatToEndOfStatement (see r172276).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172277 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 00:23:24 +00:00
Eli Bendersky
bf706b3f99 Make ParseIdentifier a public method instead of private.
The MCAsmParser interface defines ParseIdentifier is public. There's no reason
whatsoever for AsmParser (which implements the MCAsmParser interface) to hide
this method.

This is all part of a bigger scheme. Several asm parsing "extensions" use the
main parser properly through the MCAsmParser interface. However,
GenericAsmParser has much more exclusive access and uses implementation details
from the concrete implementation - AsmParser, in which it is also declared as
a friend. This makes for overly coupled code, and even makes it hard to split
GenericAsmParser into a separate file. There's no reason why GenericAsmParser
shouldn't be able to access AsmParser through an abstract interface, as long
as it's actually registered as an extension.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172276 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 00:05:00 +00:00
Michael Gottesman
dcf669560e Fixed whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 23:08:52 +00:00
Nadav Rotem
66de2af815 PPC: Implement efficient lowering of sign_extend_inreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172269 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 22:57:48 +00:00
Eli Bendersky
9b1bb05386 Proof of concept moving of generic directive parsing from AsmParser to the
GenericAsmParser extension, where a lot of directives are already being parsed.
The end goal is having just a single place (and a single lookup table) for
all directive parsing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 22:55:28 +00:00
Preston Gurd
1452d46e0b Update patch for the pad short functions pass for Intel Atom (only).
Adds a check for -Oz, changes the code to not re-visit BBs,
and skips over DBG_VALUE instrs.

Patch by Andy Zhang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172258 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 22:06:56 +00:00
Benjamin Kramer
8ecd3be1f3 Remove some accidentaly duplicated code. This needs urgent cleanup :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172248 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:11:33 +00:00
Michael Gottesman
cddd8a613e Added debug messages to GlobalOpt.
Specifically:
1. Added a missing new line when we emit a debug message saying that we are marking a global variable as constant.
2. Added debug messages that describe what is occuring when GlobalOpt is evaluating a block/function.
3. Added a debug message that says what specific constructor is being evaluated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172247 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:07:53 +00:00
Benjamin Kramer
69e42dbd00 Split TargetLowering into a CodeGen and a SelectionDAG part.
This fixes some of the cycles between libCodeGen and libSelectionDAG. It's still
a complete mess but as long as the edges consist of virtual call it doesn't
cause breakage. BasicTTI did static calls and thus broke some build
configurations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172246 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:05:37 +00:00
Nadav Rotem
3e40d927a7 ARM Cost Model: Modify the target independent cost model to ask
the target if it supports the different CAST types. We didn't do this
on X86 because of the different register sizes and types, but on ARM
this makes sense.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172245 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 19:54:13 +00:00
Justin Holewinski
9c0d0f55da Remove PTX->NVPTX in CodeGenerator document and update its text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 18:47:10 +00:00
Justin Holewinski
c059d56aa7 Update CodeGenerator document to add a "Not Applicable" category to the
Target Feature Matrix, and update the PTX column with this new category.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172234 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 18:37:54 +00:00
Eric Christopher
fffe363493 For inline asm:
- recognize string "{memory}" in the MI generation
- mark as mayload/maystore when there's a memory clobber constraint.

PR14859.

Patch by Krzysztof Parzyszek

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172228 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 18:12:39 +00:00
Andrew Trick
eed4e0193f Follow-up typo correction from building the wrong branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172224 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 17:51:16 +00:00
Andrew Trick
e9ccacd376 Fix typo from r170452. Affects -enable-misched heuristics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172223 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 17:46:50 +00:00
Andrew Trick
74c1be27a4 Update CMakeLists for CallPrinter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172222 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 17:34:05 +00:00
Andrew Trick
a125cacf7d Added -view-callgraph module pass.
-dot-callgraph similarly follows a standard module pass pattern.

Patch by Speziale Ettore!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172220 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 17:28:14 +00:00
Eli Bendersky
dced3cdb04 Fix bug in exception table allocation (PR13678)
Patch by Michael Muller.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 16:33:30 +00:00
Justin Holewinski
8c1e72e6ac Remove lib/Target/PTX directory. It was empty and obsolete but apparently git-svn does not remove empty directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 13:14:17 +00:00
Tim Northover
5f2801bd65 Simplify writing floating types to assembly.
This removes previous special cases for each floating-point type in favour of a
shared codepath.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172189 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 10:36:13 +00:00
Dmitry Vyukov
fc183ceae3 llvm-symbolizer: add DATA command that allows to symbolize global variables.
Example:
>DATA bin/clang 0x26e8e40
<llvm::SparcSubTypeKV
<40799808 416
The last line is address and size of the object.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172180 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 07:16:20 +00:00
Nadav Rotem
a675c74208 ARM Cost Model: We need to detect the max bitwidth of types in the loop in order to select the max vectorization factor.
We don't have a detailed analysis on which values are vectorized and which stay scalars in the vectorized loop so we use
another method. We look at reduction variables, loads and stores, which are the only ways to get information in and out
of loop iterations. If the data types are extended and truncated then the cost model will catch the cost of the vector
zext/sext/trunc operations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172178 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 07:11:59 +00:00
Michael Gottesman
04a0dc7729 Converted test dont-tce-tail-marked-call.ll to use FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 04:16:35 +00:00
Michael Gottesman
fff44aea75 This commit is a 4x squash commit consisting of 4x functions converted to use FileCheck instead of grep.
Messages:
Converted test case trivial_codegen_tailcall.ll to use FileCheck.
Converted test return_constant.ll to use FileCheck instead of grep.
Converted test reorder_load.ll to use FileCheck instead of grep.
Converted test intervening-inst.ll to use FileCheck instead of grep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172171 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 04:12:53 +00:00
NAKAMURA Takumi
b956ec176a Revert r172153, "llvm/lib/MC/MCParser/AsmParser.cpp: [ms-inline-asm] Fix a couple of undefined behaviors. Operand->needAddressOf() is not initialized at !Operand->isReg()."
It has been redundant since r172157.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 02:50:09 +00:00
Jordan Rose
9b1e854698 SMDiagnostic: don't emit ranges if there are /any/ multibyte characters.
Right now, only OS X has a way to determine the column width of a string
(PR14910). Until we have a good way to deal with this, we just won't
print carets, source ranges, or fixits for SMDiagnostic if the source line
has multibyte characters in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 02:37:55 +00:00
Sean Silva
a7aec400a7 docs: Fix long standing linking antipattern.
Before we learned about :doc:, we used :ref: and put a dummy link at the
top of each page. Don't do that anymore.

This fixes PR14891 as a special case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 02:28:08 +00:00
Sean Silva
52b23731d6 docs: fix misleading description.
PR14890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172160 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 01:54:16 +00:00
Michael Ilseman
4d0b4a45dc Support for half intrinsics. Pushes MMX into slower encoding path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172159 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 01:45:05 +00:00
NAKAMURA Takumi
b789b949b6 X86AsmParser.cpp: Fix up r172148, to add initializer in another CreateMem().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172157 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 01:13:54 +00:00