platform/upstream/llvm.git
11 years agoDo not handle void types in DataLayout. Patch by Patrick Hägglund.
Duncan Sands [Thu, 15 Nov 2012 14:45:30 +0000 (14:45 +0000)]
Do not handle void types in DataLayout.  Patch by Patrick Hägglund.

llvm-svn: 168042

11 years agoUse empty parens for empty function parameter list instead of '(void)'.
Dmitri Gribenko [Thu, 15 Nov 2012 14:28:07 +0000 (14:28 +0000)]
Use empty parens for empty function parameter list instead of '(void)'.

llvm-svn: 168041

11 years ago[ASan] Poison the leftmost shadow byte with a special value so that we can find
Alexander Potapenko [Thu, 15 Nov 2012 13:40:44 +0000 (13:40 +0000)]
[ASan] Poison the leftmost shadow byte with a special value so that we can find
the beginning of the fake frame when reporting an use-after-return error.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=126

llvm-svn: 168040

11 years ago[UBSan] Add support for building ubsan runtime library on Linux with 'make'. Clang...
Alexey Samsonov [Thu, 15 Nov 2012 12:40:37 +0000 (12:40 +0000)]
[UBSan] Add support for building ubsan runtime library on Linux with 'make'. Clang part.

llvm-svn: 168039

11 years ago[UBSan] Add support for building ubsan runtime library on Linux with 'make'. Compiler...
Alexey Samsonov [Thu, 15 Nov 2012 12:37:55 +0000 (12:37 +0000)]
[UBSan] Add support for building ubsan runtime library on Linux with 'make'. Compiler-rt part.

llvm-svn: 168038

11 years agoMake GlobalOpt be conservative with TLS variables (PR14309)
Hans Wennborg [Thu, 15 Nov 2012 11:40:00 +0000 (11:40 +0000)]
Make GlobalOpt be conservative with TLS variables (PR14309)

For global variables that get the same value stored into them
everywhere, GlobalOpt will replace them with a constant. The problem is
that a thread-local GlobalVariable looks like one value (the address of
the TLS var), but is different between threads.

This patch introduces Constant::isThreadDependent() which returns true
for thread-local variables and constants which depend on them (e.g. a GEP
into a thread-local array), and teaches GlobalOpt not to track such
values.

llvm-svn: 168037

11 years agoAdd support for SPIR64 target - the 64bit counterpart of SPIR.
Guy Benyei [Thu, 15 Nov 2012 10:35:47 +0000 (10:35 +0000)]
Add support for SPIR64 target - the 64bit counterpart of SPIR.

The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures.

llvm-svn: 168036

11 years agoFix a crash observed by Shuxin Yang. The issue here is that LinearizeExprTree,
Duncan Sands [Thu, 15 Nov 2012 09:58:38 +0000 (09:58 +0000)]
Fix a crash observed by Shuxin Yang.  The issue here is that LinearizeExprTree,
the utility for extracting a chain of operations from the IR, thought that it
might as well combine any constants it came across (rather than just returning
them along with everything else).  On the other hand, the factorization code
would like to see the individual constants (this is quite reasonable: it is
much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6;
you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo
multiplications of constants as it may at first appear).  This patch therefore
makes LinearizeExprTree stupider: it now leaves optimizing to the optimization
part of reassociate, and sticks to just analysing the IR.

llvm-svn: 168035

11 years ago[ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c
Alexander Potapenko [Thu, 15 Nov 2012 08:32:16 +0000 (08:32 +0000)]
[ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c
The need for this has been reported by Jack Howarth (howarth@bromo.med.uc.edu) who's porting ASan-Darwin to GCC

llvm-svn: 168032

11 years agoTeach the uninitialized field warning about anonymous structs and union members.
Nick Lewycky [Thu, 15 Nov 2012 08:19:20 +0000 (08:19 +0000)]
Teach the uninitialized field warning about anonymous structs and union members.
Fixes PR14073!

llvm-svn: 168031

11 years agoRevert changing FNEG of v4f32 to Expand. It's legal.
Craig Topper [Thu, 15 Nov 2012 08:09:46 +0000 (08:09 +0000)]
Revert changing FNEG of v4f32 to Expand. It's legal.

llvm-svn: 168030

11 years agoMake FNEG and FABS of v4f32 Expand.
Craig Topper [Thu, 15 Nov 2012 08:06:12 +0000 (08:06 +0000)]
Make FNEG and FABS of v4f32 Expand.

llvm-svn: 168029

11 years agoMake a bunch of floating point operations on vectors Expand so that instruction selec...
Craig Topper [Thu, 15 Nov 2012 08:02:19 +0000 (08:02 +0000)]
Make a bunch of floating point operations on vectors Expand so that instruction selection won't fail.

llvm-svn: 168028

11 years agoMake -ffp-contract a codegen option, rather than a laguage option. This makes
Lang Hames [Thu, 15 Nov 2012 07:51:26 +0000 (07:51 +0000)]
Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.

llvm-svn: 168027

11 years agoAdd missing documentation for llvm.exp2, llvm.log10, and llvm.log2.
Craig Topper [Thu, 15 Nov 2012 07:01:39 +0000 (07:01 +0000)]
Add missing documentation for llvm.exp2, llvm.log10, and llvm.log2.

llvm-svn: 168026

11 years agoAdd llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.
Craig Topper [Thu, 15 Nov 2012 06:51:10 +0000 (06:51 +0000)]
Add llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.

llvm-svn: 168025

11 years agoRevert r167567, restoring the ability of clang to run gcc in cases where it
Nick Lewycky [Thu, 15 Nov 2012 05:36:36 +0000 (05:36 +0000)]
Revert r167567, restoring the ability of clang to run gcc in cases where it
can't handle the input file type. This resulted in PR14338.

llvm-svn: 168024

11 years agoFix an off-by-one error by switching < to <= in -Wtautological-constant-out-of-range...
Richard Trieu [Thu, 15 Nov 2012 03:43:50 +0000 (03:43 +0000)]
Fix an off-by-one error by switching < to <= in -Wtautological-constant-out-of-range-compare and added test case.

llvm-svn: 168023

11 years agoDo not use data recursion in ASTMatchFinder.
Daniel Jasper [Thu, 15 Nov 2012 03:29:05 +0000 (03:29 +0000)]
Do not use data recursion in ASTMatchFinder.

The matchers rely on the complete AST being traversed as shown by the new test cases.

llvm-svn: 168022

11 years agoFix an obvious merge bug in -join-globalcopies (disabled).
Andrew Trick [Thu, 15 Nov 2012 02:32:22 +0000 (02:32 +0000)]
Fix an obvious merge bug in -join-globalcopies (disabled).

Jakub Staszak spotted this in review. I don't notice these things
until I manually rerun benchmarks. But reducing unit tests is a very
high priority.

llvm-svn: 168021

11 years ago[analyzer] Fix test case broken by previous commit.
Jordan Rose [Thu, 15 Nov 2012 02:17:09 +0000 (02:17 +0000)]
[analyzer] Fix test case broken by previous commit.

llvm-svn: 168020

11 years ago[analyzer] Make sure calls in synthesized functions have valid path locations.
Jordan Rose [Thu, 15 Nov 2012 02:07:23 +0000 (02:07 +0000)]
[analyzer] Make sure calls in synthesized functions have valid path locations.

We do this by using the "most recent" good location: if a synthesized
function 'A' calls another function 'B', the path notes for the call to 'B'
will be placed at the same location as the path note for calling 'A'.

Similarly, the call to 'A' will have a note saying "Entered call from...",
and now we just don't emit that (since the user doesn't have a body to look
at anyway).

Previously, we were doing this for the "Calling..." notes, but not for the
"Entered call from..." or "Returning to caller". This caused a crash when
the path entered and then exiting a call within a synthesized body.

<rdar://problem/12657843>

llvm-svn: 168019

11 years agoIn cases where the Objective-C ivar symbols are stripped out,
Sean Callanan [Thu, 15 Nov 2012 02:02:04 +0000 (02:02 +0000)]
In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets.
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>

llvm-svn: 168018

11 years ago[PCH] Reading expressions from attributes should be done using ReadExpr(),
Argyrios Kyrtzidis [Thu, 15 Nov 2012 01:31:39 +0000 (01:31 +0000)]
[PCH] Reading expressions from attributes should be done using ReadExpr(),
not ReadExpr().

Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.

Fixes rdar://12584141 & http://llvm.org/PR13982

llvm-svn: 168017

11 years agoFix a trivial bool-related bug I spotted while skimming David Fang's
Eli Friedman [Thu, 15 Nov 2012 01:21:59 +0000 (01:21 +0000)]
Fix a trivial bool-related bug I spotted while skimming David Fang's
current list of powerpc-darwin8 failures.

llvm-svn: 168016

11 years agoAdd link to cfe-users mailing list.
Tanya Lattner [Thu, 15 Nov 2012 01:13:31 +0000 (01:13 +0000)]
Add link to cfe-users mailing list.

llvm-svn: 168015

11 years agoAdd some release notes that say we removed the CellSPU port.
Eric Christopher [Thu, 15 Nov 2012 00:59:52 +0000 (00:59 +0000)]
Add some release notes that say we removed the CellSPU port.

llvm-svn: 168014

11 years agoInstCombineAndOrXor.cpp: Escape bracket in doxygen description. [-Wdocumentation]
NAKAMURA Takumi [Thu, 15 Nov 2012 00:35:50 +0000 (00:35 +0000)]
InstCombineAndOrXor.cpp: Escape bracket in doxygen description. [-Wdocumentation]

llvm-svn: 168013

11 years agoPer [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
Richard Smith [Thu, 15 Nov 2012 00:31:27 +0000 (00:31 +0000)]
Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
type-name is looked up in the context of the complete postfix-expression. Don't
forget to pass the scope into this lookup when the type-name is a template-id;
it might name an alias template which can't be found within the class itself.

Bug spotted by Johannes Schaub on #llvm.

llvm-svn: 168011

11 years agoFix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the type
Eli Friedman [Thu, 15 Nov 2012 00:29:07 +0000 (00:29 +0000)]
Fix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the type
BinaryOperator::Opcode.  This is bad form, and the behavior of the static_cast
in this case is unspecified according to the standard.

Fixes a warning that showed up from r167992 on self-host.

llvm-svn: 168010

11 years agoUse LLVM_DELETED_FUNCTION.
Jakub Staszak [Thu, 15 Nov 2012 00:25:36 +0000 (00:25 +0000)]
Use LLVM_DELETED_FUNCTION.

llvm-svn: 168009

11 years agoAdd doInitialization and doFinalization methods to ModulePass's, to allow them to...
Owen Anderson [Thu, 15 Nov 2012 00:14:15 +0000 (00:14 +0000)]
Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.

Patch by Pedro Artigas.

llvm-svn: 168008

11 years agoobjective-C blocks: make cc1 flag -encode-extended-block-signature
Fariborz Jahanian [Thu, 15 Nov 2012 00:01:28 +0000 (00:01 +0000)]
objective-C blocks: make cc1 flag -encode-extended-block-signature
the default. // rdar://12109031

llvm-svn: 168007

11 years agoRemove unneeded #includes.
Jakub Staszak [Wed, 14 Nov 2012 23:58:57 +0000 (23:58 +0000)]
Remove unneeded #includes.

llvm-svn: 168006

11 years agoMake template diffing handle integral expressions of various widths correctly.
Eli Friedman [Wed, 14 Nov 2012 23:57:08 +0000 (23:57 +0000)]
Make template diffing handle integral expressions of various widths correctly.
PR14342.

llvm-svn: 168005

11 years agoAdd -cc1 option -fno-diagnostics-use-presumed-location, a handy mode for
Richard Smith [Wed, 14 Nov 2012 23:55:25 +0000 (23:55 +0000)]
Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode for
working with preprocessed testcases. This causes source locations in
diagnostics to point at the spelling location instead of the presumed location,
while still keeping the semantic effects of the line directives (entering and
leaving system-header mode, primarily).

llvm-svn: 168004

11 years ago[utils/ClangDataFormat.py] Add data formatter for StringRef.
Argyrios Kyrtzidis [Wed, 14 Nov 2012 23:52:19 +0000 (23:52 +0000)]
[utils/ClangDataFormat.py] Add data formatter for StringRef.

llvm-svn: 168003

11 years ago[utils/ClangDataFormat.py] In the summary of SourceLocation, include whether it is
Argyrios Kyrtzidis [Wed, 14 Nov 2012 23:52:11 +0000 (23:52 +0000)]
[utils/ClangDataFormat.py] In the summary of SourceLocation, include whether it is
local or loaded.

llvm-svn: 168002

11 years agoNVPTXISelLowering.cpp: Fix warnings. [-Wunused-variable]
NAKAMURA Takumi [Wed, 14 Nov 2012 23:46:15 +0000 (23:46 +0000)]
NVPTXISelLowering.cpp: Fix warnings. [-Wunused-variable]

llvm-svn: 168001

11 years ago<rdar://problem/12408181> Test case to make sure this area of ObjC support does not...
Enrico Granata [Wed, 14 Nov 2012 23:45:48 +0000 (23:45 +0000)]
<rdar://problem/12408181> Test case to make sure this area of ObjC support does not regress in the future

llvm-svn: 168000

11 years agoThis patch is in preparation for adding medium code model support to the
Bill Schmidt [Wed, 14 Nov 2012 23:23:27 +0000 (23:23 +0000)]
This patch is in preparation for adding medium code model support to the
PPC64 target.  The five tests modified herein test code generation that is
sensitive to the code model selected.  So I've added -code-model=small to
the RUN commands for each.

Since small code model is the default, this has no effect for now; but this
prepares us for eventually changing the default to medium code model for PPC64.

Test changes verified with small and medium code model as default on
powerpc64-unknown-linux-gnu.  All tests continue to pass.

llvm-svn: 167999

11 years agodocs: Improve typographical correctness.
Sean Silva [Wed, 14 Nov 2012 23:15:51 +0000 (23:15 +0000)]
docs: Improve typographical correctness.

llvm-svn: 167998

11 years agoobjective-C blocks: under cc1 flag -encode-extended-block-signature,
Fariborz Jahanian [Wed, 14 Nov 2012 23:11:38 +0000 (23:11 +0000)]
objective-C blocks: under cc1 flag -encode-extended-block-signature,
generate expanded signature encoding to include types as we
already do this for protocol method lists.
// rdar://12109031

llvm-svn: 167997

11 years agodocs: Sphinxify TestSuiteMakefileGuide
Sean Silva [Wed, 14 Nov 2012 23:11:10 +0000 (23:11 +0000)]
docs: Sphinxify TestSuiteMakefileGuide

Some small related fixups to TestingGuide too.

llvm-svn: 167996

11 years ago[analyzer] Fix test in previous commit.
Jordan Rose [Wed, 14 Nov 2012 23:09:52 +0000 (23:09 +0000)]
[analyzer] Fix test in previous commit.

llvm-svn: 167995

11 years ago[analyzer] Add a test case for printing a path note at a PreStmt point.
Jordan Rose [Wed, 14 Nov 2012 23:03:55 +0000 (23:03 +0000)]
[analyzer] Add a test case for printing a path note at a PreStmt point.

This is also a false-positive test case for <rdar://problem/12415065>.

<rdar://problem/12687586>

llvm-svn: 167994

11 years agoImprove -Wtautological-constant-out-of-range-compare by taking into account
Richard Trieu [Wed, 14 Nov 2012 22:50:24 +0000 (22:50 +0000)]
Improve -Wtautological-constant-out-of-range-compare by taking into account
type conversion between integers.  This allows the warning to be more accurate.

Also, turned the warning off in an analyzer test.  The relavent test cases
are covered by the tests in Sema.

llvm-svn: 167992

11 years agoUse reserve() to avoid vector reallocation.
Jakub Staszak [Wed, 14 Nov 2012 22:42:17 +0000 (22:42 +0000)]
Use reserve() to avoid vector reallocation.

llvm-svn: 167991

11 years agoTeach the AST importer to merge enumerator constants. Fixes
Douglas Gregor [Wed, 14 Nov 2012 22:29:20 +0000 (22:29 +0000)]
Teach the AST importer to merge enumerator constants. Fixes
<rdar://problem/12676166>, and tested on the LLDB side of the world.

llvm-svn: 167990

11 years agoMake sure to not get AVX code on an AVX-capable host. Revealed in r167967.
Jakub Staszak [Wed, 14 Nov 2012 22:24:01 +0000 (22:24 +0000)]
Make sure to not get AVX code on an AVX-capable host. Revealed in r167967.

llvm-svn: 167989

11 years agotest/CodeGen/Hexagon/postinc-load.ll: Suppress it for now. It triggered the failure...
NAKAMURA Takumi [Wed, 14 Nov 2012 22:22:37 +0000 (22:22 +0000)]
test/CodeGen/Hexagon/postinc-load.ll: Suppress it for now. It triggered the failure on i686 hosts.

llvm-svn: 167988

11 years agoFew more small CellSPU removals.
Eric Christopher [Wed, 14 Nov 2012 22:13:56 +0000 (22:13 +0000)]
Few more small CellSPU removals.

llvm-svn: 167987

11 years agoFix CMake build.
Eric Christopher [Wed, 14 Nov 2012 22:10:47 +0000 (22:10 +0000)]
Fix CMake build.

llvm-svn: 167986

11 years agoWhen evaluating variably modified types for function parameters, dig out the
Eli Friedman [Wed, 14 Nov 2012 22:09:59 +0000 (22:09 +0000)]
When evaluating variably modified types for function parameters, dig out the
type as written from the ParmVarDecl; it's unclear whether the standard
(C99 6.9.1p10) requires this, but we're following the precedent set by gcc,
and hopefully nobody will ever ask about this again.

PR9559 / <rdar://problem/12621983>.

llvm-svn: 167985

11 years agoRemove the CellSPU port.
Eric Christopher [Wed, 14 Nov 2012 22:09:20 +0000 (22:09 +0000)]
Remove the CellSPU port.

Approved by Chris Lattner.

llvm-svn: 167984

11 years agoRemove the cellspu port.
Eric Christopher [Wed, 14 Nov 2012 22:08:59 +0000 (22:08 +0000)]
Remove the cellspu port.

Approved by Chris Lattner.

llvm-svn: 167983

11 years agoParseTemplate.cpp: Prune obsolete descriptions in ParseSingleDeclarationAfterTemplate...
NAKAMURA Takumi [Wed, 14 Nov 2012 21:45:43 +0000 (21:45 +0000)]
ParseTemplate.cpp: Prune obsolete descriptions in ParseSingleDeclarationAfterTemplate(), for now. [-Wdocumentation]

/// \param TemplateParams if non-NULL, the template parameter lists
/// that preceded this declaration. In this case, the declaration is a
/// template declaration, out-of-line definition of a template, or an
/// explicit template specialization. When NULL, the declaration is an
/// explicit template instantiation.
///
/// \param TemplateLoc when TemplateParams is NULL, the location of
/// the 'template' keyword that indicates that we have an explicit
/// template instantiation.

llvm-svn: 167982

11 years ago[analyzer] Ensure that CmpRuns recursively walks the output directory.
Anna Zaks [Wed, 14 Nov 2012 21:32:16 +0000 (21:32 +0000)]
[analyzer] Ensure that CmpRuns recursively walks the output directory.

llvm-svn: 167981

11 years agoRestrict optimized __pad_and_output implementation detail to desired releases.
Howard Hinnant [Wed, 14 Nov 2012 21:17:15 +0000 (21:17 +0000)]
Restrict optimized __pad_and_output implementation detail to desired releases.

llvm-svn: 167980

11 years agodocs: Sphinxify TestingGuide
Sean Silva [Wed, 14 Nov 2012 21:09:30 +0000 (21:09 +0000)]
docs: Sphinxify TestingGuide

llvm-svn: 167979

11 years agoSupport for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
Alexander Kornienko [Wed, 14 Nov 2012 21:07:37 +0000 (21:07 +0000)]
Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
FileCheck.

llvm-svn: 167978

11 years agoFix invalid asserts, use llvm_unreachable instead.
Jakub Staszak [Wed, 14 Nov 2012 21:03:40 +0000 (21:03 +0000)]
Fix invalid asserts, use llvm_unreachable instead.

llvm-svn: 167976

11 years agollvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.
NAKAMURA Takumi [Wed, 14 Nov 2012 21:01:40 +0000 (21:01 +0000)]
llvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.

llvm-svn: 167975

11 years agoAdded multiclass for post-increment load instructions.
Jyotsna Verma [Wed, 14 Nov 2012 20:38:48 +0000 (20:38 +0000)]
Added multiclass for post-increment load instructions.

llvm-svn: 167974

11 years agoForce CPU in test so we don't accidentally get AVX code on an AVX-capable host.
Benjamin Kramer [Wed, 14 Nov 2012 20:31:42 +0000 (20:31 +0000)]
Force CPU in test so we don't accidentally get AVX code on an AVX-capable host.

llvm-svn: 167973

11 years agocanJoinPhys method doesn't modify CoalescerPair. Make it const.
Jakub Staszak [Wed, 14 Nov 2012 20:31:04 +0000 (20:31 +0000)]
canJoinPhys method doesn't modify CoalescerPair. Make it const.

llvm-svn: 167972

11 years agoAdded %(line), %(line+<number>), %(line-<number>) substitutions to lit
Alexander Kornienko [Wed, 14 Nov 2012 20:26:19 +0000 (20:26 +0000)]
Added %(line), %(line+<number>), %(line-<number>) substitutions to lit

llvm-svn: 167971

11 years agoRemove dead code.
Chad Rosier [Wed, 14 Nov 2012 20:25:37 +0000 (20:25 +0000)]
Remove dead code.

llvm-svn: 167970

11 years agoFix comment.
Jakub Staszak [Wed, 14 Nov 2012 20:21:29 +0000 (20:21 +0000)]
Fix comment.

llvm-svn: 167969

11 years agoRemove DOS line endings.
Jakub Staszak [Wed, 14 Nov 2012 20:18:34 +0000 (20:18 +0000)]
Remove DOS line endings.

llvm-svn: 167968

11 years agoX86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.
Benjamin Kramer [Wed, 14 Nov 2012 20:08:40 +0000 (20:08 +0000)]
X86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.

The stack realignment code was fixed to work when there is stack realignment and
a dynamic alloca is present so this shouldn't cause correctness issues anymore.

Note that this also enables generation of AVX instructions for memset
under the assumptions:
- Unaligned loads/stores are always fast on CPUs supporting AVX
- AVX is not slower than SSE
We may need some tweaked heuristics if one of those assumptions turns out not to
be true.

Effectively reverts r58317. Part of PR2962.

llvm-svn: 167967

11 years agoReplace std::vector -> SmallVector in BBVectorize
Hal Finkel [Wed, 14 Nov 2012 19:53:27 +0000 (19:53 +0000)]
Replace std::vector -> SmallVector in BBVectorize

For now, this uses 8 on-stack elements. I'll need to do some profiling
to see if this is the best number.

Pointed out by Jakob in post-commit review.

llvm-svn: 167966

11 years agoUpdate my email address and update the code ownership
Nadav Rotem [Wed, 14 Nov 2012 19:47:48 +0000 (19:47 +0000)]
Update my email address and update the code ownership

llvm-svn: 167965

11 years agoFileCheck.rst: change formatting of code-like constructs to use a monospaced
Dmitri Gribenko [Wed, 14 Nov 2012 19:42:32 +0000 (19:42 +0000)]
FileCheck.rst: change formatting of code-like constructs to use a monospaced
font.  These were formatted in bold, but that's not correct.

llvm-svn: 167964

11 years agoThe code pattern "imm0_255_neg" is used for checking if an immediate value is a small...
Nadav Rotem [Wed, 14 Nov 2012 19:39:15 +0000 (19:39 +0000)]
The code pattern "imm0_255_neg" is used for checking if an immediate value is a small negative number.
This patch changes the definition of negative from -0..-255 to -1..-255. I am changing this because of
a bug that we had in some of the patterns that assumed that "subs" of zero does not set the carry flag.

rdar://12028498

llvm-svn: 167963

11 years agoAdd myself as code owner for NVPTX target
Justin Holewinski [Wed, 14 Nov 2012 19:36:27 +0000 (19:36 +0000)]
Add myself as code owner for NVPTX target

llvm-svn: 167962

11 years agodocs: nuke GCCFEBuildInstrs.html
Sean Silva [Wed, 14 Nov 2012 19:34:48 +0000 (19:34 +0000)]
docs: nuke GCCFEBuildInstrs.html

llvm-svn: 167961

11 years ago[NVPTX] Implement custom lowering of loads/stores for i1
Justin Holewinski [Wed, 14 Nov 2012 19:19:16 +0000 (19:19 +0000)]
[NVPTX] Implement custom lowering of loads/stores for i1

Loads from i1 become loads from i8 followed by trunc
Stores to i1 become zext to i8 followed by store to i8

Fixes PR13291

llvm-svn: 167948

11 years agoFix comment
Anton Korobeynikov [Wed, 14 Nov 2012 19:17:44 +0000 (19:17 +0000)]
Fix comment

llvm-svn: 167947

11 years agoIn ExpressionEvaluationContextRecord manage LambdaMangle with a shared
Argyrios Kyrtzidis [Wed, 14 Nov 2012 19:16:13 +0000 (19:16 +0000)]
In ExpressionEvaluationContextRecord manage LambdaMangle with a shared
pointer, otherwise we will double free it when ExpressionEvaluationContextRecord
gets copied.

Fixes crash in rdar://12645424 & http://llvm.org/PR14252

llvm-svn: 167946

11 years agoFix really stupid ARM EHABI info generation bug: we should not emit
Anton Korobeynikov [Wed, 14 Nov 2012 19:13:30 +0000 (19:13 +0000)]
Fix really stupid ARM EHABI info generation bug: we should not emit
eh table and handler data if there are no landing pads in the function.
Patch by Logan Chien with some cleanups from me.

llvm-svn: 167945

11 years agoClaim ownership.
Chad Rosier [Wed, 14 Nov 2012 18:43:21 +0000 (18:43 +0000)]
Claim ownership.

llvm-svn: 167943

11 years agoFix the largest offender of determinism in BBVectorize
Hal Finkel [Wed, 14 Nov 2012 18:38:11 +0000 (18:38 +0000)]
Fix the largest offender of determinism in BBVectorize

Iterating over the children of each node in the potential vectorization
plan must happen in a deterministic order (because it affects which children
are erased when two children conflict). There was no need for this data
structure to be a map in the first place, so replacing it with a vector
is a small change.

I believe that this was the last remaining instance if iterating over the
elements of a Dense* container where the iteration order could matter.
There are some remaining iterations over std::*map containers where the order
might matter, but so long as the Value* for instructions in a block increase
with the order of the instructions in the block (or decrease) monotonically,
then this will appear to be deterministic.

llvm-svn: 167942

11 years agoSort the code owner list alphabetically. Add myself as lib/DebugInfo owner.
Benjamin Kramer [Wed, 14 Nov 2012 18:17:45 +0000 (18:17 +0000)]
Sort the code owner list alphabetically. Add myself as lib/DebugInfo owner.

llvm-svn: 167940

11 years agoX86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.
Jim Grosbach [Wed, 14 Nov 2012 18:04:47 +0000 (18:04 +0000)]
X86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.

When an instruction as written requires 32-bit mode and we're assembling
in 64-bit mode, or vice-versa, issue a more specific diagnostic about
what's wrong.

rdar://12700702

llvm-svn: 167937

11 years agos/assert/llvm_unreachable/
Matt Beaumont-Gay [Wed, 14 Nov 2012 17:58:11 +0000 (17:58 +0000)]
s/assert/llvm_unreachable/

llvm-svn: 167936

11 years agoThe ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
John McCall [Wed, 14 Nov 2012 17:48:31 +0000 (17:48 +0000)]
The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
which is not coincidentally the only place it works, either (because
of how it tests for EH_TYPE symbols).

llvm-svn: 167935

11 years agofixes a buildbot failure.
Fariborz Jahanian [Wed, 14 Nov 2012 17:43:08 +0000 (17:43 +0000)]
fixes a buildbot failure.

llvm-svn: 167934

11 years agoGrab debug information for code ownership.
Eric Christopher [Wed, 14 Nov 2012 17:33:40 +0000 (17:33 +0000)]
Grab debug information for code ownership.

llvm-svn: 167933

11 years agoFix 80-column violation.
Fariborz Jahanian [Wed, 14 Nov 2012 17:27:27 +0000 (17:27 +0000)]
Fix 80-column violation.

llvm-svn: 167932

11 years agoobjective-C blocks: Provide layout map for byref
Fariborz Jahanian [Wed, 14 Nov 2012 17:15:51 +0000 (17:15 +0000)]
objective-C blocks: Provide layout map for byref
variables captured in a block. // rdar://12184410

llvm-svn: 167931

11 years agoChange C++0x references to C++11, Fixes bug #12745
Marshall Clow [Wed, 14 Nov 2012 16:31:15 +0000 (16:31 +0000)]
Change C++0x references to C++11, Fixes bug #12745

llvm-svn: 167930

11 years agos/tranform/transform/
Benjamin Kramer [Wed, 14 Nov 2012 15:08:31 +0000 (15:08 +0000)]
s/tranform/transform/

llvm-svn: 167929

11 years ago[TSan] fix indentation
Alexey Samsonov [Wed, 14 Nov 2012 14:33:59 +0000 (14:33 +0000)]
[TSan] fix indentation

llvm-svn: 167928

11 years agoEmit relocations from .debug_aranges to .debug_info for asm files
Alexey Samsonov [Wed, 14 Nov 2012 09:55:38 +0000 (09:55 +0000)]
Emit relocations from .debug_aranges to .debug_info for asm files

llvm-svn: 167926

11 years agoMove some GNUStep-specific code out of CGObjCGNU.
John McCall [Wed, 14 Nov 2012 09:08:34 +0000 (09:08 +0000)]
Move some GNUStep-specific code out of CGObjCGNU.

Patch by Jonathan Schleifer.

llvm-svn: 167925

11 years agoRevert some redundant parts of r142605.
Patrik Hägglund [Wed, 14 Nov 2012 09:04:56 +0000 (09:04 +0000)]
Revert some redundant parts of r142605.

This seems like redundant leftovers from r142288 - exposing
TargetData::parseSpecifier to LLParser - which got reverted. Removes
redunant td != NULL checks in parseSpecifier, and simplifies the
interface to parseSpecifier and init.

llvm-svn: 167924

11 years agotest: LLVM supports now vectors of arbitrary pointers
Tobias Grosser [Wed, 14 Nov 2012 08:25:52 +0000 (08:25 +0000)]
test: LLVM supports now vectors of arbitrary pointers

This allows Polly to vectorize more code. Fix the relevant test cases.

llvm-svn: 167923

11 years agoSet FFLOOR of vectors to expand to keep intruction selection from failing.
Craig Topper [Wed, 14 Nov 2012 08:11:25 +0000 (08:11 +0000)]
Set FFLOOR of vectors to expand to keep intruction selection from failing.

llvm-svn: 167922

11 years agoMark myself as owner of BBVectorize and PowerPC
Hal Finkel [Wed, 14 Nov 2012 07:59:10 +0000 (07:59 +0000)]
Mark myself as owner of BBVectorize and PowerPC

llvm-svn: 167921