Argyrios Kyrtzidis [Tue, 5 Feb 2013 16:36:52 +0000 (16:36 +0000)]
[frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.
Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.
Related to radar://
13140508
llvm-svn: 174385
Nico Weber [Tue, 5 Feb 2013 16:21:00 +0000 (16:21 +0000)]
Formatter: Detect ObjC method expressions after unary operators.
llvm-svn: 174384
Alexander Potapenko [Tue, 5 Feb 2013 15:57:12 +0000 (15:57 +0000)]
[ASan] Delete the code related to static runtime on OS X.
Nuke lib/interception/mach_override.
llvm-svn: 174383
Manuel Klimek [Tue, 5 Feb 2013 15:52:21 +0000 (15:52 +0000)]
Adds JSON output for replacements, to simplify tools integration.
Using -output-replacements will now output the replacements instead
of the changed code. This allows easier integration with tools that
need full control over what changed.
The format is an array of objects with the members "offset" (number),
"length" (number) and "replacement_text" (string), for example:
[
{
"offset": 42,
"length": 5,
"replacement_text": " "
},
{
"offset": 105,
"length": 4,
"replacement_text": ""
}
]
llvm-svn: 174382
Meador Inge [Tue, 5 Feb 2013 15:41:27 +0000 (15:41 +0000)]
Support: ensure proper state in ErrorOr copy ctors before calling 'get'
Some paths through the copy constructors for 'ErrorOr' were calling
'get' when 'HasError' and 'IsValid' were not properly initialized.
Depending on what happened to be in memory for those member variables
the asserts in 'get' might incorrectly fire. Fixed by ensuring that
the member variables in question are always initialized before calling
'get'.
llvm-svn: 174381
NAKAMURA Takumi [Tue, 5 Feb 2013 15:32:16 +0000 (15:32 +0000)]
Formatting.
llvm-svn: 174380
NAKAMURA Takumi [Tue, 5 Feb 2013 15:32:10 +0000 (15:32 +0000)]
llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll: "-debug" requires +Asserts.
llvm-svn: 174379
Manuel Klimek [Tue, 5 Feb 2013 15:25:34 +0000 (15:25 +0000)]
Implements support for specifying multiple ranges.
This is backwards compatible with earlier integrations.
Also adds a basic test and a test for the ranges integration.
You can now run:
clang-format -offset=42 -length=15 -offset=150 -length=22
To re-format the ranges (42, +15) and (150, +22).
llvm-svn: 174378
Arnold Schwaighofer [Tue, 5 Feb 2013 15:08:02 +0000 (15:08 +0000)]
Loop Vectorizer: Handle pointer stores/loads in getWidestType()
In the loop vectorizer cost model, we used to ignore stores/loads of a pointer
type when computing the widest type within a loop. This meant that if we had
only stores/loads of pointers in a loop we would return a widest type of 8bits
(instead of 32 or 64 bit) and therefore a vector factor that was too big.
Now, if we see a consecutive store/load of pointers we use the size of a pointer
(from data layout).
This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced
test case is the first test in vector_ptr_load_store.ll).
radar://
13139343
llvm-svn: 174377
Evgeniy Stepanov [Tue, 5 Feb 2013 15:02:12 +0000 (15:02 +0000)]
[asan] Fix Win/Mac build.
llvm-svn: 174376
Tim Northover [Tue, 5 Feb 2013 15:01:51 +0000 (15:01 +0000)]
Fix remaining StringRef abuse.
This should fix the valgrind buildbot failure.
llvm-svn: 174375
NAKAMURA Takumi [Tue, 5 Feb 2013 14:44:16 +0000 (14:44 +0000)]
Revert r174343, "When the target-independent DAGCombiner inferred a higher alignment for a load,"
It caused hangups in compiling clang/lib/Parse/ParseDecl.cpp and clang/lib/Driver/Tools.cpp in stage2 on some hosts.
llvm-svn: 174374
Evgeniy Stepanov [Tue, 5 Feb 2013 14:32:03 +0000 (14:32 +0000)]
[asan] Fix nonsensical reports of partial right OOB.
In case of partial right OOB, ASan was reporting
X is located 0 bytes to the right of [A, B)
where X was actually inside [A, B).
With this change, ASan will report B as the error address in such case.
llvm-svn: 174373
Logan Chien [Tue, 5 Feb 2013 14:18:59 +0000 (14:18 +0000)]
Link .ARM.exidx with corresponding text section.
The sh_link in the ELF section header of .ARM.exidx should
be filled with the section index of the corresponding text
section.
llvm-svn: 174372
Arnold Schwaighofer [Tue, 5 Feb 2013 14:05:55 +0000 (14:05 +0000)]
ARM cost model: Cost for scalar integer casts and floating point conversions
Also adds some costs for vector integer float conversions.
llvm-svn: 174371
Tim Northover [Tue, 5 Feb 2013 13:24:56 +0000 (13:24 +0000)]
Fix formatting in AArch64 backend.
This should fix three purely whitespace issues:
+ 80 column violations.
+ Tab characters.
+ TableGen brace placement.
No functional changes.
llvm-svn: 174370
Tim Northover [Tue, 5 Feb 2013 13:24:47 +0000 (13:24 +0000)]
Remove cyclic dependency in AArch64 libraries
This moves the bit twiddling and string fiddling functions required by other
parts of the backend into a separate library. Previously they resided in
AArch64Desc, which created a circular dependency between various components.
llvm-svn: 174369
Tobias Grosser [Tue, 5 Feb 2013 12:27:23 +0000 (12:27 +0000)]
TempScopInfo: clang-format
llvm-svn: 174368
Tobias Grosser [Tue, 5 Feb 2013 12:27:22 +0000 (12:27 +0000)]
Dependences: clang-format
Everything except INITIALIZE_PASS_* macros
llvm-svn: 174367
Tobias Grosser [Tue, 5 Feb 2013 12:09:06 +0000 (12:09 +0000)]
ScopInfo: clang-format file
clang-format was able to format the entire file except the final
INITIALIZE_PASS_* macros.
llvm-svn: 174366
Tobias Grosser [Tue, 5 Feb 2013 11:56:05 +0000 (11:56 +0000)]
ScopDetect: clang-format pointer types in templates
llvm-svn: 174365
Daniel Jasper [Tue, 5 Feb 2013 10:07:47 +0000 (10:07 +0000)]
Initial support for formatting ObjC method declarations/calls.
We can now format stuff like:
- (void)doSomethingWith:(GTMFoo *)theFoo
rect:(NSRect)theRect
interval:(float)theInterval {
[myObject doFooWith:arg1 //
name:arg2
error:arg3];
}
This seems to fix everything mentioned in llvm.org/PR14939.
llvm-svn: 174364
Daniel Jasper [Tue, 5 Feb 2013 09:41:21 +0000 (09:41 +0000)]
Fix some linebreak decisions in Google format.
Before:
f(
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa +
aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(
aaaaaaaaaaaaa,
aaaaaaaaaaaaa,
aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa));
After:
f(
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa +
aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(
aaaaaaaaaaaaa,
aaaaaaaaaaaaa,
aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa));
llvm-svn: 174363
Tobias Grosser [Tue, 5 Feb 2013 09:40:22 +0000 (09:40 +0000)]
ScopDetection: clang-format some more code
llvm-svn: 174362
Daniel Jasper [Tue, 5 Feb 2013 09:34:14 +0000 (09:34 +0000)]
Fix formatting regression introduced by r174307.
In preprocessor definitions, we would not parse all the tokens and thus
not annotate them anymore. This led to a wrong formatting of comments
in google style:
#endif // HEADER_GUARD -- requires two spaces
llvm-svn: 174361
Jack Carter [Tue, 5 Feb 2013 09:30:03 +0000 (09:30 +0000)]
This patch that sets the Mips ELF header flag for
MicroMips architectures.
Contributer: Zoran Jovanovic
llvm-svn: 174360
Arnaud A. de Grandmaison [Tue, 5 Feb 2013 09:06:17 +0000 (09:06 +0000)]
Fix typo in comment
llvm-svn: 174359
Jack Carter [Tue, 5 Feb 2013 08:32:10 +0000 (08:32 +0000)]
This patch that sets the EmitAlias flag in td files
and enables the instruction printer to print aliased
instructions.
Due to usage of RegisterOperands a change in common
code (utils/TableGen/AsmWriterEmitter.cpp) is required
to get the correct register value if it is a RegisterOperand.
Contributer: Vladimir Medic
llvm-svn: 174358
Michael J. Spencer [Tue, 5 Feb 2013 08:22:27 +0000 (08:22 +0000)]
[Support][ErrorOr] Add support for convertable types.
llvm-svn: 174357
Bill Wendling [Tue, 5 Feb 2013 08:09:32 +0000 (08:09 +0000)]
Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.
llvm-svn: 174356
Michael Gottesman [Tue, 5 Feb 2013 08:01:22 +0000 (08:01 +0000)]
Changed in comment cxx -> C++. Thanks Richard Smith!.
llvm-svn: 174355
Jack Carter [Tue, 5 Feb 2013 07:47:41 +0000 (07:47 +0000)]
This patch changes a static_cast to dyn_cast
for MipsELFStreamer objects.
Contributer: Jack Carter
llvm-svn: 174354
NAKAMURA Takumi [Tue, 5 Feb 2013 07:37:07 +0000 (07:37 +0000)]
TextDiagnostic.cpp: Suppress a warning to use ptrdiff_t on i686-clang. [-Wsign-compare]
llvm-svn: 174353
Eric Christopher [Tue, 5 Feb 2013 07:32:03 +0000 (07:32 +0000)]
Construct a skeleton cu for each compile unit in the module, not just
for the first compile unit.
llvm-svn: 174352
Eric Christopher [Tue, 5 Feb 2013 07:32:00 +0000 (07:32 +0000)]
Add support for testing the output of the abbrev table for the
skeleton CU as part of the DWARF5 split dwarf proposal.
llvm-svn: 174351
Eric Christopher [Tue, 5 Feb 2013 07:31:55 +0000 (07:31 +0000)]
Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.
llvm-svn: 174350
Eric Christopher [Tue, 5 Feb 2013 07:29:57 +0000 (07:29 +0000)]
Driver and option support for -gsplit-dwarf. This is a part of
the DWARF5 split dwarf proposal.
llvm-svn: 174349
Eric Christopher [Tue, 5 Feb 2013 07:29:49 +0000 (07:29 +0000)]
Spaces instead of tabs.
llvm-svn: 174348
Bill Wendling [Tue, 5 Feb 2013 07:19:31 +0000 (07:19 +0000)]
Use the do-while(0) thing for this #define.
llvm-svn: 174347
Alexey Samsonov [Tue, 5 Feb 2013 07:01:34 +0000 (07:01 +0000)]
Print error messages from MemoryBuffer::getFile() in llvm-symbolizer
llvm-svn: 174346
Michael Gottesman [Tue, 5 Feb 2013 06:53:26 +0000 (06:53 +0000)]
Add code to GlobalVariable.h so that global variables marked as
externally_initialized return false for hasDefiniteInitializer and
hasUniqueInitializer.
rdar://
12580965.
llvm-svn: 174345
Ted Kremenek [Tue, 5 Feb 2013 06:33:47 +0000 (06:33 +0000)]
Revert "Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users."
I changed my mind. We should just document these in the man page.
llvm-svn: 174344
Owen Anderson [Tue, 5 Feb 2013 06:25:30 +0000 (06:25 +0000)]
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment. However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.
This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.
llvm-svn: 174343
Ted Kremenek [Tue, 5 Feb 2013 06:21:59 +0000 (06:21 +0000)]
Remove dead code related to the now defunct PCH stat cache.
llvm-svn: 174342
Nick Lewycky [Tue, 5 Feb 2013 06:20:31 +0000 (06:20 +0000)]
Test for virtual instead of pure here. It has the exact same effect, and John
claims it will improve performance.
llvm-svn: 174341
Michael Gottesman [Tue, 5 Feb 2013 05:57:38 +0000 (05:57 +0000)]
Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.
llvm-svn: 174340
Richard Smith [Tue, 5 Feb 2013 05:55:57 +0000 (05:55 +0000)]
PR15095: Use more correct source locations for the InitListExpr we fake up for
vector initialization. Patch by John Stratton!
llvm-svn: 174339
Ted Kremenek [Tue, 5 Feb 2013 05:55:21 +0000 (05:55 +0000)]
Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users.
llvm-svn: 174338
Richard Smith [Tue, 5 Feb 2013 05:52:24 +0000 (05:52 +0000)]
Add some missing diagnostics for C++11 narrowing conversions.
llvm-svn: 174337
Manman Ren [Mon, 4 Feb 2013 23:45:08 +0000 (23:45 +0000)]
[Stack Alignment] emit warning instead of a hard error
Per discussion in rdar://
13127907, we should emit a hard error only if
people write code where the requested alignment is larger than achievable
and assumes the low bits are zeros. A warning should be good enough when
we are not sure if the source code assumes the low bits are zeros.
rdar://
13127907
llvm-svn: 174336
Bill Wendling [Mon, 4 Feb 2013 23:32:23 +0000 (23:32 +0000)]
Initial cleanups of the param-attribute code in the bitcode reader/writer.
Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.
llvm-svn: 174335
Jason Molenda [Mon, 4 Feb 2013 23:30:05 +0000 (23:30 +0000)]
Remove the m_images(NULL) hack in the Target ctor now
that the original issue has been fixed by r174222.
llvm-svn: 174334
Enrico Granata [Mon, 4 Feb 2013 22:54:42 +0000 (22:54 +0000)]
<rdar://problem/
12953018>
Synthetic children and summary for std::vector<bool> (for both libcxx and libstdcpp).
std::vector<bool> is a special case and is custom-implemented to be a vector of bits, which means we failed to handle it with the standard std::vector<T> formatter.
This checkin provides custom formatters that work correctly
llvm-svn: 174333
Alexey Samsonov [Mon, 4 Feb 2013 15:55:26 +0000 (15:55 +0000)]
Replace global std::string with const char[]
llvm-svn: 174332
Jyotsna Verma [Mon, 4 Feb 2013 15:52:56 +0000 (15:52 +0000)]
Hexagon: Add V4 combine instructions and some more Def Pats for V2.
llvm-svn: 174331
Benjamin Kramer [Mon, 4 Feb 2013 15:52:32 +0000 (15:52 +0000)]
Disable a couple more vector splat optimizations on PPC.
I didn't see those because the test case used "not grep". FileCheck the test and
XFAIL it, preserving the old optimization, so this can be fixed eventually.
llvm-svn: 174330
Tobias Grosser [Mon, 4 Feb 2013 15:46:25 +0000 (15:46 +0000)]
ScopDetection: Improve printing of alias sets
We now show the all members of the alias set that may couse possible aliasing.
In case a alias set member is not a named instruction (unnamed instructions or
constant expressions), we show the expression itself.
This improves our error message
from:
Possible aliasing for value: .reg2mem
to:
Possible aliasing: ".reg2mem",
"[0 x double]* inttoptr (i64
47255179264 to [0 x double]*)
llvm-svn: 174329
Tim Northover [Mon, 4 Feb 2013 15:44:38 +0000 (15:44 +0000)]
Fix some abuses of StringRef
We were taking a StringRef to a temporary result, which can go horribly wrong.
llvm-svn: 174328
Benjamin Kramer [Mon, 4 Feb 2013 15:19:33 +0000 (15:19 +0000)]
X86: Open up some opportunities for constant folding by postponing shift lowering.
Fixes PR15141.
llvm-svn: 174327
Benjamin Kramer [Mon, 4 Feb 2013 15:19:25 +0000 (15:19 +0000)]
X86: Simplify code. No functionality change.
llvm-svn: 174326
Benjamin Kramer [Mon, 4 Feb 2013 15:19:18 +0000 (15:19 +0000)]
SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following:
input:
x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16>
lowered to:
tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8>
x = ADD tmp, tmp
The add now gets folded immediately and we're back at the BUILD_VECTOR we
started from. I don't see a way to fix this currently so I left it disabled
for now.
Fix some trivially foldable X86 tests too.
llvm-svn: 174325
Tim Northover [Mon, 4 Feb 2013 14:14:58 +0000 (14:14 +0000)]
Give explicit suffix to integer constant over 32-bits.
llvm-svn: 174324
Tim Northover [Mon, 4 Feb 2013 12:32:21 +0000 (12:32 +0000)]
Enable AArch64 as a target built by default.
llvm-svn: 174322
Tim Northover [Mon, 4 Feb 2013 12:15:00 +0000 (12:15 +0000)]
Update debugging test for change in expected metadata.
llvm-svn: 174321
Manuel Klimek [Mon, 4 Feb 2013 10:59:20 +0000 (10:59 +0000)]
Implements the convenience matcher findAll.
We found that findAll has been implemented incorrectly multiple times
by various people using the matchers. To prevent further wasted
development effort, it makes sense to add it as convenience matcher
implemented as eachOf(m, forEachDescendant(m)).
This patch also updates the docs with the new matchers.
llvm-svn: 174320
Dmitry Vyukov [Mon, 4 Feb 2013 10:42:38 +0000 (10:42 +0000)]
asan/tsan: fix failing CHECK on windows
llvm-svn: 174319
Alexey Samsonov [Mon, 4 Feb 2013 10:31:39 +0000 (10:31 +0000)]
[Sanitizer] use proper casting in *stat functions on Mac
llvm-svn: 174318
Dmitri Gribenko [Mon, 4 Feb 2013 10:24:58 +0000 (10:24 +0000)]
Coding standards: don't use ``inline`` when defining a function in a class
definition
Current practice is not to use 'inline' in:
class Foo {
public:
inline void bar() {
// ...
}
};
llvm-svn: 174317
Alexey Samsonov [Mon, 4 Feb 2013 10:16:50 +0000 (10:16 +0000)]
[Sanitizer] extend internal libc with stat/fstat/lstat functions
llvm-svn: 174316
Manuel Klimek [Mon, 4 Feb 2013 09:42:38 +0000 (09:42 +0000)]
Add an eachOf matcher.
eachOf gives closure on the forEach and forEachDescendant matchers.
Before, it was impossible to implement a findAll matcher, as matching
the node or any of its descendants was not expressible (since anyOf
only triggers the first match).
llvm-svn: 174315
Daniel Jasper [Mon, 4 Feb 2013 08:34:57 +0000 (08:34 +0000)]
Improve handling of trailing block comments
This is a follow up to r174309 to actually make it work.
llvm-svn: 174314
Patrik Hagglund [Mon, 4 Feb 2013 08:15:53 +0000 (08:15 +0000)]
Pass CPPFLAGS/CFLAGS/CXXFLAGS from the environment of configure to
Makefile.config.
This is implied at the bottom of the help text of configure (besides
CC/CXX/LDFLAGS, already passed to Makefile.config).
For backward compatibility, the values of CFLAGS and CXXFLAGS defaults
to empty, overriding the default values provided by autoconf (for
example, '-g -O2' when CC=gcc').
$(CPP) is not used by our makefiles. Therefore, the value of CPP is
not passed to Makefile.config, despite beeing mentioned by 'configure
--help'.
llvm-svn: 174313
Dmitry Vyukov [Mon, 4 Feb 2013 08:07:45 +0000 (08:07 +0000)]
asan/tsan: fix compilation errors/bugs on Windows where long is 32-bit even in 64-bit mode
llvm-svn: 174312
Dmitry Vyukov [Mon, 4 Feb 2013 08:06:32 +0000 (08:06 +0000)]
tsan: intercept bind/listen
llvm-svn: 174311
Daniel Jasper [Mon, 4 Feb 2013 07:34:48 +0000 (07:34 +0000)]
Improve formatting of stream operators.
If there are string literals on either side of a '<<', chances are
high that they represent logically separate concepts. Otherwise,
the author could just have just a single literal (possible split
over multiple lines).
So, we can now nicely format things like:
cout << "somepacket = {\n"
<< " val a = " << ValueA << "\n"
<< " val b = " << ValueB << "\n"
<< "}";
llvm-svn: 174310
Daniel Jasper [Mon, 4 Feb 2013 07:32:14 +0000 (07:32 +0000)]
Improve handling of trailing block comments.
We can now (even in non-bin-packing modes) format:
someFunction(1, /* comment 1 */
2, /* comment 2 */
3, /* comment 3 */
aaa);
llvm-svn: 174309
Daniel Jasper [Mon, 4 Feb 2013 07:30:30 +0000 (07:30 +0000)]
Fix an error in formatting of for-loops.
Two minor changes:
* Slight penalty for breaking at "," as opposed to ";".
* Don't apply bin-packing rules to for-loops.
Before:
for (int aaaaaa =
aaaaaaaaaa; aaaaaa <
bbbbbbbb; ++aaaaaa,
++
ccccccccccccccc) {}
After:
for (int aaaaaa =
aaaaaaaaaa; aaaaaa <
bbbbbbbb;
++aaaaaa, ++
ccccccccccccccc) {}
llvm-svn: 174308
Daniel Jasper [Mon, 4 Feb 2013 07:21:18 +0000 (07:21 +0000)]
Restructuring of token annotation for formatting.
This combines several changes:
* Calculation token type (e.g. for * and &) in the AnnotatingParser.
* Calculate the scope binding strength in the AnnotatingParser.
* Let <> and [] scopes bind stronger than () and {} scopes.
* Add minimal debugging output.
llvm-svn: 174307
Evgeniy Stepanov [Mon, 4 Feb 2013 07:03:24 +0000 (07:03 +0000)]
More MSan/ASan annotations.
This change lets us bootstrap LLVM/Clang under ASan and MSan. It contains
fixes for 2 issues:
- X86JIT reads return address from stack, which MSan does not know is
initialized.
- bugpoint tests run binaries with RLIMIT_AS. This does not work with certain
Sanitizers.
We are no longer including config.h in Compiler.h with this change.
llvm-svn: 174306
David Blaikie [Mon, 4 Feb 2013 05:56:36 +0000 (05:56 +0000)]
[DebugInfo] remove more node indirection (this time from the subprogram's variable lists)
llvm-svn: 174305
David Blaikie [Mon, 4 Feb 2013 05:31:37 +0000 (05:31 +0000)]
PR15149: crash when printing debug info metadata containing an invalid language spec
llvm-svn: 174304
NAKAMURA Takumi [Mon, 4 Feb 2013 05:06:21 +0000 (05:06 +0000)]
clang/Analysis: Fix r174245, a valgrind error in AnalysisDeclContext::getBody(bool &IsAutosynthesized), to initialize IsAutosynthesized explicitly.
llvm-svn: 174303
Michael Gottesman [Mon, 4 Feb 2013 03:22:00 +0000 (03:22 +0000)]
Removed reference to LLVM as a project (since in LangRef it is used solely as a reference to the IR). Thanks silvas!
llvm-svn: 174301
Arnold Schwaighofer [Mon, 4 Feb 2013 02:52:05 +0000 (02:52 +0000)]
ARM cost model: Penalize insertelement into D subregisters
Swift has a renaming dependency if we load into D subregisters. We don't have a
way of distinguishing between insertelement operations of values from loads and
other values. Therefore, we are pessimistic for now (The performance problem
showed up in example 14 of gcc-loops).
radar://
13096933
llvm-svn: 174300
Edwin Vane [Mon, 4 Feb 2013 02:32:44 +0000 (02:32 +0000)]
Turn off uninitialized-use warnings for gcc in cmake build
Added support to the cmake build to turn off uninitialized use warnings
for gcc. This cleans the build up somewhat.
Used logic simpler than found in autoconf by making use of the fact that
although gcc won't complain about unsupported -Wno-* flags it *will*
complain about unsupported -W flags.
Reviewers: gribozavr, doug.gregor, chandlerc
llvm-svn: 174299
NAKAMURA Takumi [Mon, 4 Feb 2013 00:47:38 +0000 (00:47 +0000)]
PPCDarwinAsmPrinter::EmitStartOfAsmFile(): Add checking range in CPUDirectives[].
llvm-svn: 174298
NAKAMURA Takumi [Mon, 4 Feb 2013 00:47:33 +0000 (00:47 +0000)]
PPCDarwinAsmPrinter::EmitStartOfAsmFile(): Add possible elements in CPUDirectives[].
llvm-svn: 174297
Dmitri Gribenko [Sun, 3 Feb 2013 23:02:47 +0000 (23:02 +0000)]
DeclPrinter: fix CXXConstructExpr printing with implicit default argument
This is an improvement of r173630, that handles the following case:
struct VirualDestrClass
{
VirualDestrClass(int arg);
virtual ~VirualDestrClass();
};
struct ConstrWithCleanupsClass
{
ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42));
};
ConstrWithCleanupsClass cwcNoArg;
That was printed as:
ConstrWithCleanupsClass cwcNoArg();
llvm-svn: 174296
Michael Gottesman [Sun, 3 Feb 2013 21:54:38 +0000 (21:54 +0000)]
Added instance variable/initializers/getter/setters for new keyword externally initialized to GlobalVariable. No *TRUE* functionality change.
I am going to add in the actual test cases with the actual functionality
changes in a later patch because I want to include some test cases.
To be clear when I say no *TRUE* functionality change I mean that this
patch (like it says in the title) only contains getters/setters and sets
up a default initial value of the instance variable to false so that
this patch does not affect any other uses of Global Variable.h.
llvm-svn: 174295
Benjamin Kramer [Sun, 3 Feb 2013 20:22:35 +0000 (20:22 +0000)]
Drop value names from test to get -Asserts builds back to green.
llvm-svn: 174294
Benjamin Kramer [Sun, 3 Feb 2013 19:59:25 +0000 (19:59 +0000)]
CodeGen: Implement hint values for dynamic_cast as described in the Itanium C++ ABI.
This can yield dramatic speedups of dynamic_cast for simple inheritance trees,
at least with libsupc++. Neither libcxxabi nor libcxxrt make use of this
hint currently, it was never implemented because clang didn't support it.
There was some concern about the number of class hierarchy walks this change
introduces. If it turns out to be an issue we can add caching either at the cast
pair level or even deeper, but we also do a lot of walks in Sema so this
codepath is probably fairly optimized already.
llvm-svn: 174293
Benjamin Kramer [Sun, 3 Feb 2013 18:55:34 +0000 (18:55 +0000)]
CodeGen: Remove unnecessary const_casts. No functionality change.
llvm-svn: 174292
Daniel Jasper [Sun, 3 Feb 2013 18:07:15 +0000 (18:07 +0000)]
Fix bug in formatting of nested initializers.
We can now format:
SomeArrayOfSomeType a = { { { 1, 2, 3 } }, { { 1, 2, 3 } },
{ {
111111111111111111111111111111,
222222222222222222222222222222,
333333333333333333333333333333 } },
{ { 1, 2, 3 } }, { { 1, 2, 3 } } };
Before, we did strange things there.
llvm-svn: 174291
Dmitri Gribenko [Sun, 3 Feb 2013 17:48:05 +0000 (17:48 +0000)]
Comment to XML conversion: replace string comparison with command ID comparison
llvm-svn: 174290
Benjamin Kramer [Sun, 3 Feb 2013 17:44:25 +0000 (17:44 +0000)]
CodeGen: Mark the runtime function __dynamic_cast as readonly & nounwind.
This allows the optimizer to CSE dynamic_casts.
llvm-svn: 174289
Joerg Sonnenberger [Sun, 3 Feb 2013 17:06:49 +0000 (17:06 +0000)]
Recognize aarch64 for --enable-targets as advertised.
llvm-svn: 174288
Dmitri Gribenko [Sun, 3 Feb 2013 16:10:26 +0000 (16:10 +0000)]
Remove unneeded const_casts
llvm-svn: 174287
Dmitri Gribenko [Sun, 3 Feb 2013 13:54:26 +0000 (13:54 +0000)]
libclang: wrap CXString implementation into 'namespace cxstring'
This removes quite a few 'cxstring::' qualifications where they are obvious.
llvm-svn: 174286
Dmitri Gribenko [Sun, 3 Feb 2013 13:52:47 +0000 (13:52 +0000)]
libclang: remove 'using namespace cxstring'
llvm-svn: 174285
Dmitri Gribenko [Sun, 3 Feb 2013 13:42:20 +0000 (13:42 +0000)]
libclang: migrate IndexingDeclVisitor to ConstDeclVisitor
llvm-svn: 174284