1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

94750 Commits

Author SHA1 Message Date
Arnold Schwaighofer
406976609b Remove logic that decides whether to vectorize or not depending on O-levels
I have moved this logic into clang and opt.

llvm-svn: 188281
2013-08-13 15:51:25 +00:00
Evgeniy Stepanov
0caff76271 Fix compiler warnings.
../lib/Target/X86/X86ISelLowering.cpp:9715:7: error: unused variable 'OpVT' [-Werror,-Wunused-variable]
  EVT OpVT = Op0.getValueType();
      ^
../lib/Target/X86/X86ISelLowering.cpp:9763:14: error: unused variable 'NumElems' [-Werror,-Wunused-variable]
    unsigned NumElems = VT.getVectorNumElements();

llvm-svn: 188269
2013-08-13 14:04:20 +00:00
Mihai Popa
f30d3c418d Fix signed overflow in when computing encodings for ADR instructions
llvm-svn: 188268
2013-08-13 14:02:13 +00:00
Elena Demikhovsky
42b33ee116 AVX-512: Added CMP and BLEND instructions.
Lowering for SETCC.

llvm-svn: 188265
2013-08-13 13:24:07 +00:00
Vladimir Medic
c797d9a921 This patch introduces changes to MipsAsmParser register parsing routines. The code now follows more deterministic path and makes the code more efficient and easier to maintain.
llvm-svn: 188264
2013-08-13 13:07:09 +00:00
Benjamin Kramer
3078fbe0e8 GCC warns about removing const with a c-style cast.
llvm-svn: 188259
2013-08-13 09:57:55 +00:00
Evgeniy Stepanov
7a9f4fb383 Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
Before this, collectAttributes() was operating on a local object.

llvm-svn: 188254
2013-08-13 07:57:01 +00:00
David Majnemer
eca1e24e80 [-cxx-abi microsoft] Stick zero initialized symbols into the .bss section for COFF
Summary:
We need to do two things:

- Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo
- Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do
  with it

This fixes PR16861.

Reviewers: rnk

Reviewed By: rnk

CC: llvm-commits

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

llvm-svn: 188244
2013-08-13 01:23:53 +00:00
Eric Christopher
aae98d918e Add the start of DIE hashing for DWARF4 type units and split dwarf
CUs.

Currently only hashes the name of CUs and the names of any children,
but it's an obvious first step to show the framework. The testcase
should continue to be correct, however, as it's an empty TU.

llvm-svn: 188243
2013-08-13 01:21:55 +00:00
Nick Lewycky
ce26d6b8d0 Fix an oversight in isPotentiallyReachable where we wouldn't do any CFG-walking
to find loops if the From and To instructions were in the same block.

Refactor the code a little now that we need to fill to start the CFG-walking
algorithm with more than one starting basic block sometimes.

Special thanks to Andrew Trick for catching an error in my understanding of
natural loops in code review.

llvm-svn: 188236
2013-08-13 00:03:47 +00:00
Eric Christopher
60bb3151e8 Add comment and source to testcase.
llvm-svn: 188234
2013-08-12 23:59:26 +00:00
Eric Christopher
302cbd1330 Reflow comment.
llvm-svn: 188233
2013-08-12 23:59:24 +00:00
Eric Christopher
d5768dc3b1 Remove empty constructor.
llvm-svn: 188232
2013-08-12 23:59:18 +00:00
Matt Arsenault
1d8ad32d3e Slightly simplify code with helper functions
e.g. Use Ty->getPointerElementType()
instead of cast<PointerType>(Ty)->getElementType()

llvm-svn: 188223
2013-08-12 23:15:58 +00:00
Rui Ueyama
9666dd3633 [FileCheck] Fix a bug that cause FileCheck to misidentify check-prefix
FileCheck should check to make sure the prefix was found, and not a word
containing it (e.g -check-prefix=BASEREL shouldn't match NOBASEREL).

Patch by Ron Ofir.

llvm-svn: 188221
2013-08-12 23:05:59 +00:00
Michael J. Spencer
bd9a40300e [Object/ELF] sh_type is not a bitfield. Fixes RuntimeDyld test failure on ARM.
llvm-svn: 188220
2013-08-12 22:59:14 +00:00
Matt Arsenault
c153cf6470 Add some braces, and spaces around operators
llvm-svn: 188219
2013-08-12 22:56:15 +00:00
Kevin Enderby
41399cecad Fix a crash with X86 Mach-O and a subtraction expression where both symbols are
undefined and produce an error message instead as this is a non-relocatable
expression with X86 Mach-O.

rdar://8920876

llvm-svn: 188218
2013-08-12 22:45:44 +00:00
Peter Collingbourne
723e9b89ec Reapply r188119 now that the bug it exposed is fixed.
llvm-svn: 188217
2013-08-12 22:38:43 +00:00
Peter Collingbourne
10cbe4a9bb DataFlowSanitizer: fix a use-after-free. Spotted by libgmalloc.
llvm-svn: 188216
2013-08-12 22:38:39 +00:00
Tom Stellard
9f798c877d R600: Set scheduling preference to Sched::Source
R600 doesn't need to do any scheduling on the SelectionDAG now that it
has a very good MachineScheduler.  Also, using the VLIW SelectionDAG
scheduler was having a major impact on compile times. For example with
the phatk kernel here are the LLVM IR to machine code compile times:

With Sched::VLIW

Total Compile Time:                  1.4890 Seconds (User + System)
SelectionDAG Instruction Scheduling: 1.1670 Seconds (User + System)

With Sched::Source

Total Compile Time:                  0.3330 Seconds (User + System)
SelectionDAG Instruction Scheduling: 0.0070 Seconds (User + System)

The code ouput was identical with both schedulers.  This may not be true
for all programs, but it gives me confidence that there won't be much
reduction, if any, in code quality by using Sched::Source.

llvm-svn: 188215
2013-08-12 22:33:21 +00:00
Michael Gottesman
4f8bae7094 Add editor C++ filetype declaration no functionality change.
llvm-svn: 188205
2013-08-12 21:10:23 +00:00
Shuxin Yang
b3af4b7f36 Revert r188188 and r188200.
In order to appease people (in Apple) who accuse me for committing "huge change" (?) without proper review. 

Thank Eric for fixing a compile-warning. 

llvm-svn: 188204
2013-08-12 21:07:31 +00:00
Michael Gottesman
4b904f1880 Fixed SelectionDAGBuilder.h C++ filetype declaration to use the canonical C++ instead of c++.
llvm-svn: 188203
2013-08-12 21:02:02 +00:00
Michael Gottesman
8ba1e36e9c Fixed another place in CodeGen where we had a typo in our editor C++ filetype declaration.
llvm-svn: 188202
2013-08-12 20:52:06 +00:00
Michael Gottesman
6b88b6e12b [branchfolding] Fix typo in C++ editor declaration.
llvm-svn: 188201
2013-08-12 20:49:27 +00:00
Eric Christopher
64cf0f48c3 Fix warning about unused member.
llvm-svn: 188200
2013-08-12 20:27:50 +00:00
Eric Christopher
6df5d15a24 Move the addition of the dwo_id as late as possible after everything
has been finalized except for sizes and offsets. Update test accordingly.

llvm-svn: 188199
2013-08-12 20:27:48 +00:00
Bill Wendling
f37b5b1f31 Move stack protector names to the same place.
llvm-svn: 188198
2013-08-12 20:09:37 +00:00
Michael Gottesman
7203dd4b96 [stack protector] Fixed typo.
llvm-svn: 188195
2013-08-12 19:44:09 +00:00
Michael Gottesman
defd024179 [stackprotector] Add in the stackprotector libcall.
We support this libcall on all platforms except for OpenBSD (See
lib/Codegen/StackProtector.cpp).

llvm-svn: 188193
2013-08-12 18:45:38 +00:00
Michael Gottesman
e32ebb94bd [stackprotector] Added intrinsic llvm.stackprotectorcheck.
llvm-svn: 188191
2013-08-12 18:35:32 +00:00
Shuxin Yang
4b4ff9ec1f Misc enhancements to LTO:
1. Add some helper classes for partitions. They are designed in a
     way such that the top-level LTO driver will not see much difference 
     with or without partitioning.

  2. Introduce work-dir. Now all intermediate files generated during 
     LTO phases will be saved under work-dir. User can specify the workdir
     via -lto-workdir=/path/to/dir. By default the work-dir will be 
     erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1.

    TODO: Erase the workdir, if the linker exit prematurely.  
      We are currently not able to remove directory on signal. The support 
      routines simply ignore directory.

  3. Add one new API lto_codegen_get_files_need_remove().
     Linker and LTO plugin will communicate via this API about which files
    (including directories) need to removed before linker exit.

llvm-svn: 188188
2013-08-12 18:29:43 +00:00
Nadav Rotem
bc08e7ce84 Fix PR16797 - Support PHINodes with multiple inputs from the same basic block.
Do not generate new vector values for the same entries because we know that the incoming values
from the same block must be identical.

llvm-svn: 188185
2013-08-12 17:46:44 +00:00
Tareq A. Siraj
135d71f85d Fixes a bug when iterating on paths
This fixes the incorrect implementation of iterating on file/directory
paths.

Differential Review: http://llvm-reviews.chandlerc.com/D1277

llvm-svn: 188183
2013-08-12 17:10:49 +00:00
Vladimir Medic
34aca92bce This patch implements ei and di instructions for mips. Test cases are added.
llvm-svn: 188176
2013-08-12 13:07:23 +00:00
Tim Northover
67f2cc8ebf Fix FileCheck --check-prefix lines.
Various tests had sprung up over the years which had --check-prefix=ABC on the
RUN line, but "CHECK-ABC:" later on. This happened to work before, but was
strictly incorrect. FileCheck is getting stricter soon though.

Patch by Ron Ofir.

llvm-svn: 188173
2013-08-12 12:43:26 +00:00
Alexey Samsonov
d27599b42b Remove unused SpecialCaseList constructors
llvm-svn: 188171
2013-08-12 11:50:44 +00:00
Alexey Samsonov
cdc0f339aa Add SpecialCaseList::createOrDie() factory and use it in sanitizer passes
llvm-svn: 188169
2013-08-12 11:46:09 +00:00
Richard Sandiford
ceb50ae8d3 Revert r188164: Stablize MCK_Reg ordering in AsmMatcherEmitter
Apparently caused a failure on Darwin

llvm-svn: 188166
2013-08-12 10:57:51 +00:00
Chandler Carruth
ecf7881af3 Remove all checking for the various terminfo headers (term.h and
curses.h). Finding these headers is next to impossible. For example, on
Debian systems libtinfo-dev provides the terminfo reading library we
want, but *not* term.h. For the header, you have to use libncurses-dev.
And libncursesw-dev provides a *different* term.h in a different
location!

These headers aren't worth it. We want two functions the signatures of
which are clearly spec'ed in sys-v and other documentation. Just declare
them ourselves and call them. This should fix some debian builders and
provide better support for "minimal" debian systems that do want color
autodetection.

llvm-svn: 188165
2013-08-12 10:40:11 +00:00
Richard Sandiford
5b47e9993e Stablize MCK_Reg ordering in AsmMatcherEmitter
clang bootstraps intermittently failed for me due a difference in
the MCK_Reg ordering in ARMGenAsmMatcher.inc.  E.g. in my latest
run the stage 1 and stage 3 versions were the same but the stage 2
one was different (though still functionally correct).  This meant
that the .o comparison failed.

MCK_Regs were assigned by iterating over a std::set< std::set<Record*> >,
and since std::set is sorted lexicographically, the order depended on the
order of the pointer values.  This patch replaces the pointer ordering
with LessRecordByID.

llvm-svn: 188164
2013-08-12 10:39:45 +00:00
Richard Sandiford
4980a32ba3 [SystemZ] Use CLC and IPM to implement memcmp
For now this is restricted to fixed-length comparisons with a length
in the range [1, 256], as for memcpy() and MVC.

llvm-svn: 188163
2013-08-12 10:28:10 +00:00
Richard Sandiford
b10e77493f [SystemZ] Add a definition of the CLC instruction
llvm-svn: 188162
2013-08-12 10:17:33 +00:00
Richard Sandiford
aed77a47b8 [SystemZ] Add a definition of the IPM instruction
llvm-svn: 188161
2013-08-12 10:05:58 +00:00
Chandler Carruth
1ee1f67312 Target a minimal terminfo library rather than necessarily a full curses
library for color support detection. This still will use a curses
library if that is all we have available on the system. This change
tries to use a smaller subset of the curses library, specifically the
subset that is on some systems split off into a separate library. For
example, if you install ncurses configured --with-tinfo, a 'libtinfo' is
install that provides just the terminfo querying functionality. That
library is now used instead of curses when it is available.

This happens to fix a build error on systems with that library because
when we tried to link ncurses into the binary, we didn't pull tinfo in
as well. =]

It should also provide an easy path for supporting the NetBSD
libterminfo library, but as I don't have access to a NetBSD system I'm
leaving adding that support to those folks.

llvm-svn: 188160
2013-08-12 09:49:17 +00:00
Tim Northover
2497b9b9ba Allow compatible extension attributes for tail calls
If the tail-callee and caller give the same bits via the same signext/zeroext
attribute then a tail-call should be allowed, since the extension has already
been done by the callee.

llvm-svn: 188159
2013-08-12 09:45:46 +00:00
Benjamin Kramer
01f2d8daf8 Remove global construction. const char* is sufficient here.
No functionality change.

llvm-svn: 188158
2013-08-12 09:37:29 +00:00
Alexey Samsonov
92dd689c77 Relax conditions of test added in r188156 to fix it on Windows
llvm-svn: 188157
2013-08-12 09:04:58 +00:00
Alexey Samsonov
d27061d7e7 Introduce factory methods for SpecialCaseList
Summary:
Doing work in constructors is bad: this change suggests to
call SpecialCaseList::create(Path, Error) instead of
"new SpecialCaseList(Path)". Currently the latter may crash with
report_fatal_error, which is undesirable - sometimes we want to report
the error to user gracefully - for example, if he provides an incorrect
file as an argument of Clang's -fsanitize-blacklist flag.

Reviewers: pcc

Reviewed By: pcc

CC: llvm-commits

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

llvm-svn: 188156
2013-08-12 07:49:36 +00:00