John McCall
30268ca2e0
Extensively comment bitfield layout, rearrange some
...
code for legibility, and fix a bug with bitfields in packed
ms_structs.
rdar://15926990
llvm-svn: 200379
2014-01-29 07:53:44 +00:00
Kostya Serebryany
6e15ec1442
[asan] simplify a test
...
llvm-svn: 200378
2014-01-29 07:35:43 +00:00
Craig Topper
0d16d2dc31
Delete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.
...
llvm-svn: 200377
2014-01-29 07:06:07 +00:00
Venkatraman Govindaraju
141d0e2221
[Sparc] Use %r_disp32 for pc_rel entries in FDE as well.
...
This makes MCAsmInfo::getExprForFDESymbol() a virtual function and overrides it in SparcMCAsmInfo.
llvm-svn: 200376
2014-01-29 06:59:20 +00:00
NAKAMURA Takumi
b366f01f83
Revert r200340, "Add line table debug info to COFF files when using a win32 triple."
...
It was incompatible with --target=i686-win32.
llvm-svn: 200375
2014-01-29 06:05:38 +00:00
Rafael Espindola
619581c3c9
Normalize the style in llvm-nm.cpp.
...
It had grown fairly inconsistent. I am about to change it quite a bit to also
use the object api when handling IR files.
llvm-svn: 200374
2014-01-29 04:56:19 +00:00
Venkatraman Govindaraju
fd5c1f9497
[Sparc] Use %r_disp32 for pc_rel entries in gcc_except_table and eh_frame.
...
Otherwise, assembler (gas) fails to assemble them with error message "operation
combines symbols in different segments". This is because MC computes
pc_rel entries with subtract expression between labels from different sections.
llvm-svn: 200373
2014-01-29 04:51:35 +00:00
Chandler Carruth
66f0b16360
[LPM] Fix PR18642, a pretty nasty bug in IndVars that "never mattered"
...
because of the inside-out run of LoopSimplify in the LoopPassManager and
the fact that LoopSimplify couldn't be "preserved" across two
independent LoopPassManagers.
Anyways, in that case, IndVars wasn't correctly preserving an LCSSA PHI
node because it thought it was rewriting (via SCEV) the incoming value
to a loop invariant value. While it may well be invariant for the
current loop, it may be rewritten in terms of an enclosing loop's
values. This in and of itself is fine, as the LCSSA PHI node in the
enclosing loop for the inner loop value we're rewriting will have its
own LCSSA PHI node if used outside of the enclosing loop. With me so
far?
Well, the current loop and the enclosing loop may share an exiting
block and exit block, and when they do they also share LCSSA PHI nodes.
In this case, its not valid to RAUW through the LCSSA PHI node.
Expected crazy test included.
llvm-svn: 200372
2014-01-29 04:40:19 +00:00
Arnold Schwaighofer
1aab75ab49
LoopVectorizer: Don't count the induction variable multiple times
...
When estimating register pressure, don't count the induction variable mulitple
times. It is unlikely to be unrolled. This is currently disabled and hidden
behind a flag ("enable-ind-var-reg-heur").
llvm-svn: 200371
2014-01-29 04:36:12 +00:00
Rafael Espindola
7a578026ae
We do use pipefail these days. Update the test.
...
llvm-svn: 200370
2014-01-29 04:08:05 +00:00
Shankar Easwaran
b6a6bdab20
[ELF][Hexagon] typeZeroFillQuick is not associated with bss section.
...
We need to increase the memory and the filesize when we add a typeZeroFillQuick
atom.
llvm-svn: 200369
2014-01-29 04:04:27 +00:00
Venkatraman Govindaraju
50f32d949b
[SparcV9] Use correct register class (I64RegClass) to hold the address of _GLOBAL_OFFSET_TABLE_ in sparcv9.
...
llvm-svn: 200368
2014-01-29 03:35:08 +00:00
Rafael Espindola
310f501ef0
Use a raw_stream to implement the mangler.
...
This is a bit more convenient for some callers, but more importantly, it is
easier to implement correctly. Doing this removes the patching of already
printed data that was used for fastcall, fixing a crash with private fastcall
symbols.
llvm-svn: 200367
2014-01-29 02:30:38 +00:00
Timur Iskhodzhanov
50672ac9cb
Add support for more instruction prefixes so we can intercept functions in the VS2013 RTL
...
llvm-svn: 200366
2014-01-29 02:00:58 +00:00
Kevin Qin
92d64d2d56
[AArch64 NEON] Lower SELECT_CC with vector operand.
...
When the scalar compare is between floating point and operands are
vector, we custom lower SELECT_CC to use NEON SIMD compare for
generating less instructions.
llvm-svn: 200365
2014-01-29 01:57:30 +00:00
David Fang
7584238232
lit.site.cfg:cxx_under_test should take precedence over 'which clang++'
...
(reviewed by Marshall Clow)
llvm-svn: 200364
2014-01-29 01:54:52 +00:00
Hans Wennborg
cfdd8b54cf
clang-cl: Better error message when trying to compile stdin (PR18640)
...
We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.
llvm-svn: 200362
2014-01-29 01:04:40 +00:00
David Woodhouse
21bfc71752
[ARM] Remove superfluous inline asm mode switch test
...
llvm-svn: 200361
2014-01-29 00:49:28 +00:00
Mark Seaborn
efe919ff8a
Remove unnecessary call to pthread_mutexattr_setpshared()
...
The default value of this attribute is PTHREAD_PROCESS_PRIVATE, so
there's no point in calling pthread_mutexattr_setpshared() to set
that.
See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_getpshared.html
This removes some ifdefs that tend to need to be extended for other
platforms (e.g. for NaCl).
Note that this call was in the first implementation of Mutex, added in
r22403, so it doesn't appear to have been added in response to a
performance problem.
Differential Revision: http://llvm-reviews.chandlerc.com/D2633
llvm-svn: 200360
2014-01-29 00:20:44 +00:00
Yunzhong Gao
eeeb8dafed
Fixing PR18430 by checking that the size of bitfields plus padding does not
...
grow into the following virtual base.
Differential Revision: http://llvm-reviews.chandlerc.com/D2560
llvm-svn: 200359
2014-01-29 00:09:16 +00:00
David Majnemer
1625245b68
MC: Clean up error paths in AsmParser::parseMacroArgument
...
Use an RAII object Instead of inserting a call to
AsmLexer::setSkipSpace(true) in all error paths.
No functional change.
llvm-svn: 200358
2014-01-29 00:07:39 +00:00
Rafael Espindola
c3ceeb6fa7
Make createObjectFile's signature a bit less error prone.
...
This will be better with c++11, but right now file_magic converts to bool,
which makes the api really easy to misuse.
llvm-svn: 200357
2014-01-29 00:02:26 +00:00
Richard Trieu
1e632af0d4
A new conversion warning for when an Objective-C object literal is implicitly
...
cast into a boolean true value. This warning will catch code like:
if (@0 ) {}
if (@"foo") {}
llvm-svn: 200356
2014-01-28 23:40:26 +00:00
David Woodhouse
a86694ca7a
[Sparc] Fix breakage in r200345
...
Oops. Don't do build tests on patches like that with --enable-targets=x86_64
llvm-svn: 200355
2014-01-28 23:38:16 +00:00
Rafael Espindola
cbf1a809c3
Finish bringing file_type to the llvm style (other than its name).
...
I assume that the name is file_type because it is the name of a c++11 type that
we will use once we convert, but at least our current implementation can look
like llvm code.
Thanks to David Blakie for the push.
llvm-svn: 200354
2014-01-28 23:36:39 +00:00
Nick Kledzik
c80ff7d4b0
Be more explicit about which overloaded variant to use. Caught by ASan!
...
llvm-svn: 200353
2014-01-28 23:25:13 +00:00
Rafael Espindola
7854f804d6
Convert to the inner enum so the compiler can warn about it in switches.
...
llvm-svn: 200352
2014-01-28 23:15:56 +00:00
David Woodhouse
7db3705f9e
Tests for mode switching
...
1. test that inlineasm works
2. test that relaxable instructions are re-encoded in the correct mode.
llvm-svn: 200351
2014-01-28 23:13:30 +00:00
David Woodhouse
d2cca113df
Delete MCSubtargetInfo data members from target MCCodeEmitter classes
...
The subtarget info is explicitly passed to the EncodeInstruction
method and we should use that subtarget info to influence any
encoding decisions.
llvm-svn: 200350
2014-01-28 23:13:25 +00:00
David Woodhouse
3fa98a65e9
Propagate MCSubtargetInfo through TableGen's getBinaryCodeForInstr()
...
llvm-svn: 200349
2014-01-28 23:13:18 +00:00
David Woodhouse
9784cef38d
Explictly pass MCSubtargetInfo to MCCodeEmitter::EncodeInstruction()
...
llvm-svn: 200348
2014-01-28 23:13:07 +00:00
David Woodhouse
f5199f68f2
Keep the MCSubtargetInfo in the MCRelxableFragment class.
...
Needed to fix PR18303 to correctly re-encode the instruction if it
is relaxed.
We keep a copy of the MCSubtargetInfo to make sure that we are not
effected by future changes to the subtarget info coming from the
assembler (e.g. when parsing .code 16 directived).
llvm-svn: 200347
2014-01-28 23:12:53 +00:00
David Woodhouse
6f3c73f7df
Modify MCObjectStreamer EmitInstTo* interface
...
Add MCSubtargetInfo parameter
virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &);
llvm-svn: 200346
2014-01-28 23:12:49 +00:00
David Woodhouse
e6c13e4abd
Change MCStreamer EmitInstruction interface to take subtarget info
...
llvm-svn: 200345
2014-01-28 23:12:42 +00:00
Hans Wennborg
1fd6dd3616
Intrin.h: include setjmp.h to get a jmp_buf definition
...
This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.
llvm-svn: 200344
2014-01-28 23:01:59 +00:00
Hans Wennborg
740a4d6e46
Intrin.h: implement __rdtsc and __halt
...
llvm-svn: 200343
2014-01-28 22:55:01 +00:00
Fariborz Jahanian
f40ef45c9d
Objective-C. Fixes a bug where "new" family attribute
...
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://15919775
llvm-svn: 200342
2014-01-28 22:46:29 +00:00
Timur Iskhodzhanov
7523743075
Disable the COFF tests on non-X86 archs
...
llvm-svn: 200341
2014-01-28 21:47:33 +00:00
Timur Iskhodzhanov
2c659648b3
Add line table debug info to COFF files when using a win32 triple.
...
Reviewed at http://llvm-reviews.chandlerc.com/D2232
llvm-svn: 200340
2014-01-28 21:33:27 +00:00
Fariborz Jahanian
33fa962441
Objective-C. provide legacy encoding of *id and *Class types
...
instead of crashing. // rdar://15824769.
llvm-svn: 200338
2014-01-28 20:41:15 +00:00
Daniel Jasper
559b63cbb9
clang-format: Understand __attribute__s preceding parameter lists.
...
Before:
ReturnType __attribute__((unused))
function(int i);
After:
ReturnType __attribute__((unused))
function(int i);
This fixes llvm.org/PR18632.
llvm-svn: 200337
2014-01-28 20:13:43 +00:00
Owen Anderson
5c65e7f345
Use the proper SDK when building iOS sim builds of LLVM and/or Mac OS X builds.
...
llvm-svn: 200335
2014-01-28 19:57:18 +00:00
Nick Kledzik
b0be8687b9
fix templates to work with pre c++11
...
llvm-svn: 200333
2014-01-28 19:33:09 +00:00
Matheus Almeida
2e03f24301
[mips] Fix ELF header flags.
...
As opposed to GCC/GAS the default ABI for Mips64 is n64.
Compatibility bit should be set if o32 ABI is used when targeting Mips64.
llvm-svn: 200332
2014-01-28 19:24:11 +00:00
Nick Kledzik
15bcb9dc42
Add BumpPtrAllocator::allocateCopy() utilities
...
Makes it easy to use BumpPtrAllocator to make a copy of StringRef strings.
llvm-svn: 200331
2014-01-28 19:21:27 +00:00
Simon Atanasyan
7aa9061ead
[Mips] Declare MipsDynamicTable class in a separate header file.
...
llvm-svn: 200328
2014-01-28 18:52:41 +00:00
Daniel Jasper
a0e9be2bb2
clang-format: Fix option formatting in protocol buffer files.
...
Before:
optional int32 foo[ default = true, deprecated = true ];
After:
optional int32 foo[default = true, deprecated = true];
llvm-svn: 200327
2014-01-28 18:51:11 +00:00
Greg Clayton
5fdb09bb76
Show help dialog the first time the "gui" is run to help users find their way.
...
llvm-svn: 200326
2014-01-28 18:41:35 +00:00
Gautam Chakrabarti
2c283400f9
[NVPTX] Fix emitting aggregate parameters
...
The code was missing the case for aggregate parameters and
hence was emitting them as .b0 type. Also fixed a couple
of comments.
llvm-svn: 200325
2014-01-28 18:35:29 +00:00
Andrea Di Biagio
2ea61f17ad
[X86] Add extra rules for combining vselect dag nodes into movsd.
...
This improves the fix committed at revision 199683 adding the
following new target specific combine rules:
1) fold (v4i32: vselect <0,0,-1,-1>, A, B) ->
(v4i32 (bitcast (movsd (v2i64 (bitcast A)), (v2i64 (bitcast B))) ))
2) fold (v4f32: vselect <0,0,-1,-1>, A, B) ->
(v4f32 (bitcast (movsd (v2f64 (bitcast A)), (v2f64 (bitcast B))) ))
3) fold (v4i32: vselect <-1,-1,0,0>, A, B) ->
(v4i32 (bitcast (movsd (v2i64 (bitcast B)), (v2i64 (bitcast A))) ))
4) fold (v4f32: vselect <-1,-1,0,0>, A, B) ->
(v4f32 (bitcast (movsd (v2i64 (bitcast B)), (v2i64 (bitcast A))) ))
llvm-svn: 200324
2014-01-28 18:14:21 +00:00