Commit Graph

88462 Commits

Author SHA1 Message Date
Dmitri Gribenko
caa91f8b85 Add a new portability macro LLVM_FUNCTION_NAME, that expands to __func__, if
supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172156 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 01:13:51 +00:00
Jakub Staszak
cbdb7e4b56 LoopPass.h doesn't require Function.h. Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172155 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 01:03:32 +00:00
NAKAMURA Takumi
51873db5af llvm/lib/MC/MCParser/AsmParser.cpp: [ms-inline-asm] Fix a couple of undefined behaviors. Operand->needAddressOf() is not initialized at !Operand->isReg().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172153 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 00:37:35 +00:00
Jakub Staszak
805141e504 Remove heavy and unused #inclues from X86TargetObjectFile.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:43:56 +00:00
Eli Bendersky
7eef9c1091 Rename enumerations s/VK/DK/ to conform to naming convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172149 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:40:56 +00:00
Chad Rosier
7109fbe982 [ms-inline asm] Make sure we set a default value for AddressOf. Follow on to
r172121.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:39:07 +00:00
Eli Bendersky
63e6f48e13 fix comments a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172146 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:32:57 +00:00
Shuxin Yang
253449db20 PR14904: Segmentation fault running pass 'Recognize loop idioms'
The root cause is mistakenly taking for granted that 
    "dyn_cast<Instruction>(a-Value)"
return a non-NULL instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:32:01 +00:00
Evan Cheng
582e4f278b CastInst::castIsValid should return true if the dest type is the same as
Value's current type. The casting is trivial even for aggregate type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:22:53 +00:00
NAKAMURA Takumi
0e4776ce61 llvm/test/CodeGen/X86/ms-inline-asm.ll: Fixup; Globals doesn't have leading underscore in symbol on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 23:02:48 +00:00
Bob Wilson
1b8eeb327e Update Apple's build script for llvmCore. <rdar://problem/12914321>
This change is basically just copying changes that we've used for Apple's
clang builds to the script used for building llvmCore. Besides cleaning it
up to use xcrun to locate the proper versions of tools, especially for cross
compiling, it fixes the build to work with newer versions of clang that
honor SDKROOT settings in the environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:59:51 +00:00
Eli Bendersky
5d0f061779 Remove a couple of if-else chains in parsing directives, replacing them by a
switch. Committed with Jim's and Chris's approval.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172136 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:44:57 +00:00
Michael J. Spencer
27b2b1b4e5 [llvm-objdump] Emit addresses with the correct number of leading 0's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172130 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:40:50 +00:00
Peter Collingbourne
03de2a621c [msan] Change va_start/va_copy shadow memset alignment to 8.
This fixes va_start/va_copy of a va_list field which happens to not
be laid out at a 16-byte boundary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172128 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:36:33 +00:00
Jakub Staszak
893a234878 Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172125 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:14:33 +00:00
Evan Cheng
4ff23d09fa PR14896: Handle memcpy from constant string where the memcpy size is larger than the string size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172124 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:13:27 +00:00
Jakub Staszak
81bfd711de Remove unneeded includes from FunctionLoweringInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:13:13 +00:00
Chad Rosier
c1ec207b61 [ms-inline asm] Add support for calling functions from inline assembly.
Part of rdar://12991541

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:10:27 +00:00
Jakub Staszak
48fdf9b379 Remove unneeded #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172118 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:07:29 +00:00
Owen Anderson
e9d4eba451 Teach InstCombine to hoist FABS and FNEG through FPTRUNC instructions. The application of these operations commutes with the truncation, so we should prefer to do them in the smallest size we can, to save register space, use smaller constant pool entries, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:06:52 +00:00
Jakub Staszak
244b7a4ba6 Fix indent and remove unneeded #includes in MDBuilder.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172115 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 22:00:36 +00:00
Jakub Staszak
446991dc34 Fix #includes after my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172114 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:56:40 +00:00
Jakub Staszak
7ccad365a7 Rename LinkAllVMCore.h to LinkAllIR.h since VMCore directory was renamed to IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172112 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:55:02 +00:00
Chris Lattner
2ba4bd97d1 remove the rest of the "written by" lines in the documentation. It is
against the developer policy to include this sort of thing as SVN blame
already captures this in a far more fine-grained way.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172109 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:24:04 +00:00
Dmitri Gribenko
f6b6c37ca2 Replace memcpys by a static_cast and an integral promotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:21:32 +00:00
Dmitri Gribenko
197616adda Fix coding style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172107 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:10:44 +00:00
Jakub Staszak
ff5ed5e2b4 Unbreak tests after regression from r172081.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172105 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 21:02:05 +00:00
Jordan Rose
9b1f44b147 Add basic fix-its to SMDiagnostic.
Like Clang's FixItHint, SMFixIt represents an insertion, replacement, or
removal of source text. One or more fix-its can be emitted as part of
a diagnostic, and will be printed below the source range line to show the
user how they can fix their code.

Currently, the only client of SMFixIt is clang-tblgen; thus, the tests for
this behavior live in clang/test/TableGen/tg-fixits.td. If/when SMFixIt is
adopted within LLVM itself, those tests should be moved to the LLVM suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:15 +00:00
Jordan Rose
b50df4a3df TableGen: Keep track of superclass reference ranges.
def foo : bar;
          ~~~

This allows us to produce more precise diagnostics about a certain
superclass, and even provide fixits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:11 +00:00
Jordan Rose
d122009e57 TableGen: record anonymous instantiations of classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:50:05 +00:00
Jakob Stoklund Olesen
4aebce8321 Allow hasProperty() to be called on bundle-internal instructions.
When calling hasProperty() on an instruction inside a bundle, it should
always behave as if IgnoreBundle was passed, and just return properties
for the current instruction.

Only attempt to aggregate bundle properties whan asked about the bundle
header.

The assertion fires on existing ARM test cases without this fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172082 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:42:44 +00:00
David Greene
5e1b31bf55 Fix Alias Bug
Use memcpy to do type punning instead of a cast.  A cast or similar
operation through a union breaks strict aliasing rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 18:17:54 +00:00
Nadav Rotem
c560bf638b LoopVectorizer: Fix a bug in the vectorization of BinaryOperators. The BinaryOperator can be folded to an Undef, and we don't want to set NSW flags to undef vals.
PR14878



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172079 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 17:34:39 +00:00
Tim Northover
12da505d93 Remove locale-dependence of enum mangling and use existing function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 16:47:31 +00:00
Tim Northover
88abcde3b4 Make TableGen mangle operand method names before putting in enum.
The purpose of this patch is to allow PredicateMethods to be set to something
like "isUImm<8>", calling a C++ template method to reduce code duplication. For
this to work, the PredicateMethod must be mangled into a valid C++ identifier
for insertion into an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 15:17:36 +00:00
Joey Gouly
2b8f6ae6b7 Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 10:49:36 +00:00
Joey Gouly
1d505a33f9 Fix TryToShrinkGlobalToBoolean in GlobalOpt, so that it does not discard address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 10:31:11 +00:00
Sean Silva
8a0f3f7811 docs: fix broken link.
PR14889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 06:39:37 +00:00
NAKAMURA Takumi
1930fbf3eb Signal.h: Add <cstdio> for FILE*, since r171989.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 05:23:59 +00:00
Michael Gottesman
5dc300107b [ObjCARC Debug Message] Added debug message when we convert an autorelease into an autoreleaseRV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 02:03:50 +00:00
Douglas Gregor
69a2d6f55a Fix a race condition in the lock-file manager: once the lock file is
gone, check for the actual file we care about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172033 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 02:01:35 +00:00
Douglas Gregor
06c7008e30 Fix a race condition in llvm::sys::path::unique_file: when we end up
failing to create the unique file because the path doesn't exist,
don't fail if someone else manages to create the path before we do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:58:46 +00:00
Jakob Stoklund Olesen
b11f050434 Support headerless bundles in MachineInstr::hasProperty().
This function can still work without a BUNDLE header instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172029 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:29:42 +00:00
Manman Ren
86441169da Stack Alignment: throw error if we can't satisfy the minimal alignment
requirement when creating stack objects in MachineFrameInfo.

Add CreateStackObjectWithMinAlign to throw error when the minimal alignment
can't be achieved and to clamp the alignment when the preferred alignment
can't be achieved. Same is true for CreateVariableSizedObject.
Will not emit error in CreateSpillStackObject or CreateStackObject.

As long as callers of CreateStackObject do not assume the object will be
aligned at the requested alignment, we should not have miscompile since
later optimizations which look at the object's alignment will have the correct
information.

rdar://12713765


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172027 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:10:10 +00:00
Michael J. Spencer
7932c41884 [Object][Archive] Fix name handling with bsd style long names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 01:05:34 +00:00
Jakub Staszak
674be02d52 Fix include guards so they exactly match file names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 00:45:19 +00:00
Michael J. Spencer
bf82b07f5f [Object][Archive] Apparently StringRef::getAsInteger for APInt accepts spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172022 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10 00:07:38 +00:00
Bill Wendling
1db9b6957c Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test hangings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172020 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 23:36:50 +00:00
Michael J. Spencer
e92800dd53 [Object][Archive] Use uint64_t instead of APInt. It is significantly faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:58:43 +00:00
Joel Jones
5573de8493 Fix description of ARMOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:34:16 +00:00