Commit Graph

159127 Commits

Author SHA1 Message Date
Tim Northover f86d1f0b77 ARM: allow cortex-m0 to use hint instructions
The hint instructions ("nop", "yield", etc) are mostly Thumb2-only, but have
been ported across to the v6M architecture. Fortunately, v6M seems to sit
nicely between v6 (thumb-1 only) and v6T2, so we can add a feature for it
fairly easily.

rdar://problem/15144406

llvm-svn: 192097
2013-10-07 11:10:47 +00:00
David Majnemer 17a44966be Windows: Be more explicit with Win32 APIs
This addresses several issues in a similar vein:
 - Use the Unicode APIs when possible, running nm on clang shows that we
   only use Unicode APIs except for FormatMessage, CreateSemaphore, and
   GetModuleHandle.  AFAICT, the latter two are coming from MinGW and
   not LLVM itself.
 - Make getMainExecutable more resilient.  It previously considered
   return values of zero from ::GetModuleFileNameA to be acceptable.

llvm-svn: 192096
2013-10-07 09:52:36 +00:00
NAKAMURA Takumi f7c520ff66 Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable]
llvm-svn: 192095
2013-10-07 09:32:50 +00:00
Manuel Klimek 91e48586ae Fix incorrect detection of class definitions with alignas specification.
llvm-svn: 192094
2013-10-07 09:15:41 +00:00
Simon Atanasyan 39ff5f6702 [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.
The patch reviewed by Michael Spencer.
http://llvm-reviews.chandlerc.com/D1846

llvm-svn: 192093
2013-10-07 08:58:27 +00:00
Richard Smith 0b87e0739e When merging class definitions across modules in C++, merge together fields.
This change doesn't go all the way to making fields redeclarable; instead, it
makes them 'mergeable', which means we can find the canonical declaration, but
not much else (and for a declaration that's not from a module, the canonical
declaration is always that declaration).

llvm-svn: 192092
2013-10-07 08:02:11 +00:00
David Majnemer 3f8f8c9dbd Driver: Use the canonical command line arguments.
Summary:
Use the arguments given to the OS at process creation-time instead of
the arguments passed into main() by the C runtime environment.  The ones
that main() received may not be suitable (e.g. not Unicode).

Depends on D1834

CC: cfe-commits

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

llvm-svn: 192091
2013-10-07 07:33:27 +00:00
Craig Topper 07ad1b23bb Remove some instructions that seem to only exist to trick the filtering checks in the disassembler table creation. Just fix up the filter to let the real instruction through instead.
llvm-svn: 192090
2013-10-07 07:19:47 +00:00
Craig Topper 68d2546ec6 Remove FsMOVAPSrr and friends. They have no patterns and are no longer selected anywhere.
llvm-svn: 192089
2013-10-07 06:10:45 +00:00
Craig Topper a0e0735e6a Teach X86 asm parser that VMOVAPSrr and other VEX-encoded register to register moves should be switched from using the MRMSrcReg form to the MRMDestReg form if the source register is a 64-bit extended register and the destination register is not.
This allows the instruction to be encoded using the 2-byte VEX form instead of the 3-byte VEX form. The GNU assembler has similar behavior and instruction selection already does this.

llvm-svn: 192088
2013-10-07 05:42:48 +00:00
Faisal Vali ad090d82f2 Refactor tryCaptureVar using ExtractMethod. No functionality change.
In chicago, Doug had requested that I go ahead and commit the refactor  as a separate change, if all the tests passed.  

Lets hope the buildbots stay quiet.

Thanks!

llvm-svn: 192087
2013-10-07 05:13:48 +00:00
Craig Topper 2658d89728 Add disassembler support for long encodings for INC/DEC in 32-bit mode.
llvm-svn: 192086
2013-10-07 04:28:06 +00:00
Marshall Clow 5d5e7dbe94 Marked issue 2284 as complete
llvm-svn: 192085
2013-10-07 03:26:42 +00:00
Shankar Easwaran bafdf7be83 [lld][Darwin] Fix unused field warning.
This field would eventually be used.

llvm-svn: 192084
2013-10-07 03:18:33 +00:00
Shankar Easwaran 18318e32a9 [lld][inputgraph] Fix build failure on Darwin/Windows
llvm-svn: 192083
2013-10-07 03:06:04 +00:00
Shankar Easwaran d8ce00360d [lld] Add FileArchive
Fix adding a missed file in the previous commit.

llvm-svn: 192082
2013-10-07 02:55:42 +00:00
Shankar Easwaran a96f3a3da4 [lld][InputGraph] Change the Resolver to use inputGraph
Changes :-

a) Functionality in InputGraph to insert Input elements at any position
b) Functionality in the Resolver to use nextFile
c) Move the functionality of assigning file ordinals to InputGraph
d) Changes all inputs to MemoryBuffers
e) Remove LinkerInput, InputFiles, ReaderArchive

llvm-svn: 192081
2013-10-07 02:47:09 +00:00
Marshall Clow 4f44079a2c Apparently, I don't know the difference between 'left' and 'right'. Swap parameters named 'lhs' and 'rhs' so that they correctly refer to the 'left hand side' and 'right hand side' of comparisons. No functionality change. Thanks to Arthur O'Dwyer for pointing this out to me.
llvm-svn: 192080
2013-10-07 02:37:18 +00:00
David Majnemer 61eae2e30c Revert "Revert "Windows: Add support for unicode command lines""
This reverts commit r192070 which reverted r192069, I forgot to
regenerate the configure scripts.

llvm-svn: 192079
2013-10-07 01:00:07 +00:00
Craig Topper a7afa71494 Fix some assert messages to say the correct opcode name. Looks like one assert got copy and pasted to many places.
llvm-svn: 192078
2013-10-06 22:38:19 +00:00
Peter Collingbourne 8b9c5d1ac7 Silence the unused function warning in exception.cpp.
Rather than try to protect the function behind a precise,
ever-changing #if expression, just inline it into every caller.

llvm-svn: 192077
2013-10-06 22:13:24 +00:00
Peter Collingbourne 3b5d969293 Implement std::exception_ptr under libsupc++.
libsupc++ does not implement the dependent EH ABI and the
functionality it uses to implement std::exception_ptr (which it
declares as an alias of std::__exception_ptr::exception_ptr) is not
directly exported to clients. So we have little choice but to hijack
std::__exception_ptr::exception_ptr's (which fortunately has the
same layout as our std::exception_ptr) copy constructor, assignment
operator and destructor (which are part of its stable ABI), and its
rethrow_exception(std::__exception_ptr::exception_ptr) function.

Also, remove some out of date comments.

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

llvm-svn: 192076
2013-10-06 22:13:21 +00:00
Peter Collingbourne 26dd09e57f Make it possible to link against libstdc++ as well as libsupc++ with CMake.
Linking against libstdc++, rather than libsupc++, is probably better
for people who need to link against clients of libstdc++.  Because
libsupc++ is provided only as a static library, its globals are not
shared between the static library and the copy linked into libstdc++.
This has been found to cause at least one test failure.

This also removes a number of symbols which were multiply defined
between libstdc++ and libc++, only when linking with libstdc++.

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

llvm-svn: 192075
2013-10-06 22:13:19 +00:00
Peter Collingbourne 926aa5f4f2 Eliminate more symbols multiply defined between libsupc++ and libc++.
The remaining multiple definitions were flushed out by attempting to
link libsupc++ and libc++ into the same executable with --whole-archive,
e.g.

clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt

(The same technique was used to flush out multiple definitions in
libstdc++.)

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

llvm-svn: 192074
2013-10-06 22:13:16 +00:00
Howard Hinnant 6d48bdd2a8 G M: 1. It changes the temp file handling to use the template and the current directory for windows, matching how it works on other platforms.
2. It re-enables the temp file handling for mingw that regressed.

llvm-svn: 192073
2013-10-06 21:14:05 +00:00
Howard Hinnant 04c63bdb36 G M: Rename local variable from __except to avoid MSVC keyword clash.
llvm-svn: 192072
2013-10-06 21:00:29 +00:00
Howard Hinnant 32f9a776fb Use _LIBCPP_NEW_DELETE_VIS instead of LIBCPP_FUNC_VIS in src/new.cpp.
llvm-svn: 192071
2013-10-06 20:53:24 +00:00
David Majnemer f636cf422e Revert "Windows: Add support for unicode command lines"
This is causing MinGW bots to fail.
This reverts commit r192069.

llvm-svn: 192070
2013-10-06 20:44:34 +00:00
David Majnemer 80bea0c315 Windows: Add support for unicode command lines
Summary:
The MSVCRT deliberately sends main() code-page specific characters.
This isn't too useful to LLVM as we end up converting the arguments to
UTF-16 and subsequently attempt to use the result as, for example, a
file name.  Instead, we need to have the ability to access the Unicode
command line and transform it to UTF-8.

This has the distinct advantage over using the MSVC-specific wmain()
function as our entry point because:
 - It doesn't work on cygwin.
 - It only work on MinGW with caveats and only then on certain versions.
 - We get to keep our entry point as main(). :)

N.B.  This patch includes fixes to other parts of lib/Support/Windows
s.t. we would be able to take advantage of getting the Unicode paths.
E.G.  clang spawning clang -cc1 would want to give it Unicode arguments.

Reviewers: aaron.ballman, Bigcheese, rnk, ruiu

Reviewed By: rnk

CC: llvm-commits, ygao

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

llvm-svn: 192069
2013-10-06 20:25:49 +00:00
Howard Hinnant f66a81ad56 Yaron Keren: Add missing comment.
llvm-svn: 192068
2013-10-06 19:48:40 +00:00
Timur Iskhodzhanov 20df98c0d0 Fix PR17382 - properly group virtual method overloads in the vftable
llvm-svn: 192067
2013-10-06 15:31:37 +00:00
Rafael Espindola 78527050c2 Add support for aliases with linkonce_odr.
This will be used to extend constructor aliases in clang.

llvm-svn: 192066
2013-10-06 15:10:43 +00:00
Benjamin Kramer 93c69ac8c3 Force a CPU that doesn't have AVX, otherwise this test fails.
llvm-svn: 192065
2013-10-06 13:52:41 +00:00
Benjamin Kramer 858a3880d6 X86: Don't fold spills into SSE operations if the stack is unaligned.
Regalloc can emit unaligned spills nowadays, but we can't fold the
spills into SSE ops if we can't guarantee alignment. PR12250.

llvm-svn: 192064
2013-10-06 13:48:22 +00:00
Elena Demikhovsky 2e408aefe0 AVX-512: added scalar convert instructions and intrinsics.
Fixed load folding in VPERM2I instruction.

llvm-svn: 192063
2013-10-06 13:11:09 +00:00
Daniel Jasper 320997e6b3 clang-format: Remove empty lines after visibility modifiers.
Formatting:
  class C {
  public:

    f();
  };

Now leads to:
  class C {
  public:
    f();
  };

llvm-svn: 192062
2013-10-06 11:40:08 +00:00
Sylvestre Ledru 0c4813e695 remove a dead assignment. The variables are set just right after. Found by scan-build http://buildd-clang.debian.net/scan-build/
llvm-svn: 192061
2013-10-06 09:54:18 +00:00
Sylvestre Ledru fd654c406e Value stored to 'pid' was never read. Found by scan-build http://buildd-clang.debian.net/scan-build/
llvm-svn: 192060
2013-10-06 09:51:02 +00:00
Simon Atanasyan 567f085177 [Mips] Add MIPS program header types.
llvm-svn: 192059
2013-10-06 08:49:41 +00:00
Marshall Clow 82f4901d5f LWG Issue 2247
llvm-svn: 192058
2013-10-06 07:19:23 +00:00
Marshall Clow 4fc5ae4c1c Updated status post-Chicago
llvm-svn: 192057
2013-10-06 07:10:55 +00:00
Venkatraman Govindaraju f482d3d338 [Sparc] Do not emit nop after fcmp* instruction with V9.
llvm-svn: 192056
2013-10-06 07:06:44 +00:00
Elena Demikhovsky 462a2d235b AVX-512: fixed shuffle lowering
in case of BLEND and added VSHUFPS patterns.

llvm-svn: 192055
2013-10-06 06:11:18 +00:00
Venkatraman Govindaraju 572d5057e3 [Sparc] Custom lower addc/adde/subc/sube on i64 in sparc64.
This is required because i64 is a legal type but addxcc/subxcc reads icc carry bit, which are 32 bit conditional codes.

llvm-svn: 192054
2013-10-06 03:36:18 +00:00
Venkatraman Govindaraju 1230342fd2 [Sparc] Use addxcc/subxcc for adde/sube instead of addx/subx.
addx/subx does not modify conditional codes whereas addxcc/subxx does.

llvm-svn: 192053
2013-10-06 02:11:10 +00:00
Mark Lacey 3825e83d6b Pass CGCXXABIs around directly.
In functions that only need to use the CGCXXABI member of a CodeGenTypes
class, pass that reference around directly rather than a reference to
a CodeGenTypes class.

This makes the actual dependence on CGCXXABI clear at the call sites.

llvm-svn: 192052
2013-10-06 01:33:34 +00:00
Marshall Clow d2f095e5ba Add tests making sure that optional<T>s can be compared at compile time; this functionality was enabled by N3789
llvm-svn: 192051
2013-10-05 23:29:16 +00:00
Aaron Ballman 4c9b7dc92e Switching the CallableWhen attribute over to using the string literal helper function instead of custom logic.
llvm-svn: 192050
2013-10-05 22:45:34 +00:00
Marshall Clow dbd2ebb07e LWG Issue 2247: Implement type trait 'is_null_pointer'
llvm-svn: 192049
2013-10-05 21:21:17 +00:00
Marshall Clow ea7c7cc521 Implement literal suffixes for compled
llvm-svn: 192048
2013-10-05 21:19:49 +00:00