platform/upstream/llvm.git
9 years ago[X86] Remove unneeded parameters and deduplicate stack alignment code
Reid Kleckner [Thu, 18 Jun 2015 18:03:25 +0000 (18:03 +0000)]
[X86] Remove unneeded parameters and deduplicate stack alignment code

NFC

llvm-svn: 240033

9 years agoFix misplaced comment
Pavel Labath [Thu, 18 Jun 2015 17:56:45 +0000 (17:56 +0000)]
Fix misplaced comment

llvm-svn: 240032

9 years agoCOFF: Rename a function. NFC.
Rui Ueyama [Thu, 18 Jun 2015 17:29:50 +0000 (17:29 +0000)]
COFF: Rename a function. NFC.

llvm-svn: 240031

9 years agoAdd new test for stress testing stack unwinding
Tamas Berghammer [Thu, 18 Jun 2015 17:17:32 +0000 (17:17 +0000)]
Add new test for stress testing stack unwinding

This test case generates new tests from the source files dropped into
its directory. For stress testing stack unwinding it steps through the
code line by line and then tests unwinding from each instruction.

llvm-svn: 240030

9 years agoFix test regression TestDisassemble_VST1_64 (caused by r239996)
Tamas Berghammer [Thu, 18 Jun 2015 17:03:25 +0000 (17:03 +0000)]
Fix test regression TestDisassemble_VST1_64 (caused by r239996)

llvm-svn: 240029

9 years agotsan: mark meta shadow as NOHUGEPAGE
Dmitry Vyukov [Thu, 18 Jun 2015 16:57:37 +0000 (16:57 +0000)]
tsan: mark meta shadow as NOHUGEPAGE

Meta shadow is compressing and we don't flush it,
so it makes sense to mark it as NOHUGEPAGE to not over-allocate memory.
On one program it reduces memory consumption from 5GB to 2.5GB.

llvm-svn: 240028

9 years agoUpdate ISL to isl-0.15-3-g532568a
Michael Kruse [Thu, 18 Jun 2015 16:45:40 +0000 (16:45 +0000)]
Update ISL to isl-0.15-3-g532568a

This version adds small integer optimization, but is not active by
default. It will be enabled in a later commit.

The schedule-fuse=min/max option has been replaced by the
serialize-sccs option. Adapting Polly was necessary, but retaining the
name polly-opt-fusion=min/max.

Differential Revision: http://reviews.llvm.org/D10505

Reviewers: grosser
llvm-svn: 240027

9 years agoAdd missing overrides to MultiplexConsumer. Test coverage will be
Adrian Prantl [Thu, 18 Jun 2015 16:41:53 +0000 (16:41 +0000)]
Add missing overrides to MultiplexConsumer. Test coverage will be
provided by an upcoming commit.

llvm-svn: 240026

9 years agoFix a typo.
Adrian Prantl [Thu, 18 Jun 2015 16:41:51 +0000 (16:41 +0000)]
Fix a typo.

llvm-svn: 240025

9 years agoclang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.
Daniel Jasper [Thu, 18 Jun 2015 16:05:17 +0000 (16:05 +0000)]
clang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.

It was a bit too aggressive.

With this patch, we keep on breaking here:
  aaaaaaaaaaaaa(aaaaaaa,
                "aaaaaaa"
                "bbbbbbb");

But don't break in:
  aaaaaaaaaaaaa(aaaaaaa, aaaaaaaa("aaaaaaa"
                                  "bbbbbbb"));

llvm-svn: 240024

9 years ago[EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.
Benjamin Kramer [Thu, 18 Jun 2015 16:01:00 +0000 (16:01 +0000)]
[EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.

While there use hash_combine instead of hand-rolled hashing. No
functionality change intended.

llvm-svn: 240023

9 years agofix typo; NFC
Sanjay Patel [Thu, 18 Jun 2015 15:53:33 +0000 (15:53 +0000)]
fix typo; NFC

llvm-svn: 240022

9 years agoclang-format: Better support functions with elaborated enum return types.
Daniel Jasper [Thu, 18 Jun 2015 15:45:17 +0000 (15:45 +0000)]
clang-format: Better support functions with elaborated enum return types.

Before, this wasn't formatted properly:
  enum ::C f() {
    return a;
  }

llvm-svn: 240021

9 years ago[SPARC] Repair GOT references to internal symbols.
James Y Knight [Thu, 18 Jun 2015 15:05:15 +0000 (15:05 +0000)]
[SPARC] Repair GOT references to internal symbols.

They had been getting emitted as a section + offset reference, which
is bogus since the value needs to be the offset within the GOT, not
the actual address of the symbol's object.

Differential Revision: http://reviews.llvm.org/D10441

llvm-svn: 240020

9 years agoAllow case-insensitive values for -march for AArch64 target in line with GCC.
Gabor Ballabas [Thu, 18 Jun 2015 14:23:12 +0000 (14:23 +0000)]
Allow case-insensitive values for -march for AArch64 target in line with GCC.

GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -march option for the AArch64 target.

llvm-svn: 240019

9 years ago[OPENMP] Codegen for 'proc_bind' clause (4.0).
Alexey Bataev [Thu, 18 Jun 2015 13:40:03 +0000 (13:40 +0000)]
[OPENMP] Codegen for 'proc_bind' clause (4.0).

Adds emission of the code for 'proc_bind(master|close|spread)' clause:
call void @__kmpc_push_proc_bind(<loc>, i32 thread_id, i32 4|3|2)

llvm-svn: 240018

9 years agoConvert a few tests to use llvm-mc.
Rafael Espindola [Thu, 18 Jun 2015 13:39:07 +0000 (13:39 +0000)]
Convert a few tests to use llvm-mc.

llvm-svn: 240017

9 years ago[LLDB][MIPS] Addressing some errors and warnings due to rL239991
Mohit K. Bhakkad [Thu, 18 Jun 2015 13:35:29 +0000 (13:35 +0000)]
[LLDB][MIPS] Addressing some errors and warnings due to rL239991

llvm-svn: 240016

9 years agoquick fix for failure from r.240012
Asaf Badouh [Thu, 18 Jun 2015 12:57:24 +0000 (12:57 +0000)]
quick fix for failure from r.240012

failure:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11847/steps/build_Lld/logs/stdio

llvm-svn: 240015

9 years agoclang-format: [JS] Add a special case for indenting function literals.
Daniel Jasper [Thu, 18 Jun 2015 12:32:59 +0000 (12:32 +0000)]
clang-format: [JS] Add a special case for indenting function literals.

Before:
  var func =
      function() {
        doSomething();
      };

After:
  var func =
      function() {
    doSomething();
  };

This is a very narrow special case which fixes most of the discrepency
with what our users do. In the long run, we should try to come up with
a more generic fix for indenting these.

llvm-svn: 240014

9 years ago[X86][AVX2] Added AVX2 SINT_TO_FP/UINT_TO_FP tests
Simon Pilgrim [Thu, 18 Jun 2015 12:32:28 +0000 (12:32 +0000)]
[X86][AVX2] Added AVX2 SINT_TO_FP/UINT_TO_FP tests

llvm-svn: 240013

9 years ago[AVX512]
Asaf Badouh [Thu, 18 Jun 2015 12:30:53 +0000 (12:30 +0000)]
[AVX512]
add instructions: VPAVGB and VPAVGW

review
http://reviews.llvm.org/D10504

llvm-svn: 240012

9 years ago[OPENMP] Support for '#pragma omp taskgroup' directive.
Alexey Bataev [Thu, 18 Jun 2015 12:14:09 +0000 (12:14 +0000)]
[OPENMP] Support for '#pragma omp taskgroup' directive.

Added parsing, sema analysis and codegen for '#pragma omp taskgroup' directive (OpenMP 4.0).
The code for directive is generated the following way:
#pragma omp taskgroup
<body>

void __kmpc_taskgroup(<loc>, thread_id);
<body>
void __kmpc_end_taskgroup(<loc>, thread_id);

llvm-svn: 240011

9 years agoUpdate LLVM bindings after r239940. Apparently these aren't included in
Daniel Jasper [Thu, 18 Jun 2015 11:51:16 +0000 (11:51 +0000)]
Update LLVM bindings after r239940. Apparently these aren't included in
any tests and I even don't know how to run the tests. This seems like a
minimal change to make them work again, although I can't really verify
at this point. Additionally, it probably makes sense to propagate the
personality parameter removal further.

llvm-svn: 240010

9 years ago[OPENMP] Fixed test for '#pragma omp parallel for simd'.
Alexey Bataev [Thu, 18 Jun 2015 11:26:55 +0000 (11:26 +0000)]
[OPENMP] Fixed test for '#pragma omp parallel for simd'.

llvm-svn: 240009

9 years ago[clang] Refactoring of conditions so they use isOneOf() instead of multiple is().
Daniel Marjamaki [Thu, 18 Jun 2015 10:59:26 +0000 (10:59 +0000)]
[clang] Refactoring of conditions so they use isOneOf() instead of multiple is().

llvm-svn: 240008

9 years agoFix duplicate shared module list entries
Aidan Dodds [Thu, 18 Jun 2015 10:25:54 +0000 (10:25 +0000)]
Fix duplicate shared module list entries

Differential Revision: http://reviews.llvm.org/D10499

llvm-svn: 240007

9 years ago[OPENMP] Add support for 'omp parallel for' directive.
Alexey Bataev [Thu, 18 Jun 2015 10:10:12 +0000 (10:10 +0000)]
[OPENMP] Add support for 'omp parallel for' directive.

Codegen for this directive is a combined codegen for 'omp parallel' region with 'omp for simd' region inside. Clauses are supported.

llvm-svn: 240006

9 years ago[MIPS64] Correct generic register number of argument registers in reginfo
Sagar Thakur [Thu, 18 Jun 2015 09:36:31 +0000 (09:36 +0000)]
[MIPS64] Correct generic register number of argument registers in reginfo

llvm-svn: 240005

9 years agoclang-format: Make AlwaysBreakBeforeMultilineStrings more conservative.
Daniel Jasper [Thu, 18 Jun 2015 09:12:47 +0000 (09:12 +0000)]
clang-format: Make AlwaysBreakBeforeMultilineStrings more conservative.

In essence this is meant to consistently indent multiline strings by a
fixed amount of spaces from the start of the line. Don't do this in
cases where it wouldn't help anyway.

Before:
  someFunction(aaaaa,
               "aaaaa"
               "bbbbb");

After:
  someFunction(aaaaa, "aaaaa"
                      "bbbbb");

llvm-svn: 240004

9 years agoAVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and VPERMI2W/D...
Elena Demikhovsky [Thu, 18 Jun 2015 08:56:19 +0000 (08:56 +0000)]
AVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.

llvm-svn: 240003

9 years agoA correction in rL239997: Added missing entry in lib/Makefile
Bhushan D. Attarde [Thu, 18 Jun 2015 08:38:40 +0000 (08:38 +0000)]
A correction in rL239997: Added missing entry in lib/Makefile

llvm-svn: 240002

9 years agoreverted 239999 due to test failures
Elena Demikhovsky [Thu, 18 Jun 2015 08:06:49 +0000 (08:06 +0000)]
reverted 239999 due to test failures

llvm-svn: 240001

9 years agoAdd ABISysV_mips.cpp to the xcode project file.
Jason Molenda [Thu, 18 Jun 2015 07:32:14 +0000 (07:32 +0000)]
Add ABISysV_mips.cpp to the xcode project file.

llvm-svn: 240000

9 years agoAVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PD
Elena Demikhovsky [Thu, 18 Jun 2015 07:29:40 +0000 (07:29 +0000)]
AVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PD
and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.

llvm-svn: 239999

9 years agoA correction in rL239996
Mohit K. Bhakkad [Thu, 18 Jun 2015 07:12:25 +0000 (07:12 +0000)]
A correction in rL239996

llvm-svn: 239998

9 years ago[LLDB][MIPS] ABI Plugin for MIPS32
Bhushan D. Attarde [Thu, 18 Jun 2015 07:02:10 +0000 (07:02 +0000)]
[LLDB][MIPS] ABI Plugin for MIPS32

SUMMARY:
This patch implements ABI plugin for MIPS32.

Reviewers: clayborg
Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
Differential Revision: http://reviews.llvm.org/D10240

llvm-svn: 239997

9 years ago[LLDB][MIPS] Emulation of MIPS64 floating-point branch instructions
Mohit K. Bhakkad [Thu, 18 Jun 2015 06:03:27 +0000 (06:03 +0000)]
[LLDB][MIPS] Emulation of MIPS64 floating-point branch instructions
Patch by Jaydeep Patil

SUMMARY:
1. Added emulation of MIPS64 floating-point branch instructions
2. Updated GetRegisterInfo to recognize floating-point registers
3. Provided CPU information while creating createMCSubtargetInfo in disassembler
4. Bug fix in emulation of JIC and JIALC
5. Correct identification of breakpoint when set in a delay slot of a branch instruction

Reviewers: clayborg
Subscribers: bhushan, mohit.bhakkad, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D10355

llvm-svn: 239996

9 years agoFix a variety of typos.
Bruce Mitchener [Thu, 18 Jun 2015 05:27:05 +0000 (05:27 +0000)]
Fix a variety of typos.

No functional change.

llvm-svn: 239995

9 years agoCOFF: Implement DLL symbol exports for bitcode files.
Peter Collingbourne [Thu, 18 Jun 2015 05:22:15 +0000 (05:22 +0000)]
COFF: Implement DLL symbol exports for bitcode files.

Differential Revision: http://reviews.llvm.org/D10530

llvm-svn: 239994

9 years agoLTO: Introduce LTOModule::getSymbolGV().
Peter Collingbourne [Thu, 18 Jun 2015 05:10:06 +0000 (05:10 +0000)]
LTO: Introduce LTOModule::getSymbolGV().

llvm-svn: 239993

9 years agoAdjust to personality function change in 239940
Tobias Grosser [Thu, 18 Jun 2015 05:02:11 +0000 (05:02 +0000)]
Adjust to personality function change in 239940

llvm-svn: 239992

9 years ago[LLDB][MIPS] Hardware Watchpoints for MIPS
Mohit K. Bhakkad [Thu, 18 Jun 2015 04:53:18 +0000 (04:53 +0000)]
[LLDB][MIPS] Hardware Watchpoints for MIPS

Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, dsanders, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D9142

llvm-svn: 239991

9 years ago[OPENMP] Add support for 'omp for simd' directive.
Alexey Bataev [Thu, 18 Jun 2015 04:45:29 +0000 (04:45 +0000)]
[OPENMP] Add support for 'omp for simd' directive.

Added codegen for combined 'omp for simd' directives, that is a combination of 'omp for' directive followed by 'omp simd' directive. Includes support for all clauses.

llvm-svn: 239990

9 years ago[autoconf] Detect OLE32 for mingw.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:16:05 +0000 (04:16 +0000)]
[autoconf] Detect OLE32 for mingw.

It has been done in CMake build.

llvm-svn: 239989

9 years agoclang-tidy: Remove an unused private field. NFC
Justin Bogner [Thu, 18 Jun 2015 04:15:04 +0000 (04:15 +0000)]
clang-tidy: Remove an unused private field. NFC

Clang was warning on this.

llvm-svn: 239988

9 years agoconfig.h.*: Rework r210144. Don't edit config.h.in manually.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:08:20 +0000 (04:08 +0000)]
config.h.*: Rework r210144. Don't edit config.h.in manually.

  - Generate #include in configure.ac.
  - Resurrect the copy of llvm-config.h.cmake into config.h.cmake.

llvm-svn: 239987

9 years agoReorder LLVM_ENABLE_ABI_BREAKING_CHECKS in llvm-config.h.*.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:07:12 +0000 (04:07 +0000)]
Reorder LLVM_ENABLE_ABI_BREAKING_CHECKS in llvm-config.h.*.

FIXME: Could we unify the description of LLVM_ENABLE_ABI_BREAKING_CHECKS between *.in and *.cmake?
llvm-svn: 239986

9 years agoRevert "[CMake] LSan is not actually available on Darwin."
Justin Bogner [Thu, 18 Jun 2015 03:39:51 +0000 (03:39 +0000)]
Revert "[CMake] LSan is not actually available on Darwin."

This change makes cmake fail to even run on Darwin with errors
evaluating "$<TARGET_OBJECTS:RTInterception.x86_64>".

This reverts r239955

llvm-svn: 239985

9 years ago[NFC] more comments in SLSR
Jingyue Wu [Thu, 18 Jun 2015 03:35:57 +0000 (03:35 +0000)]
[NFC] more comments in SLSR

llvm-svn: 239984

9 years agoSilence resource compiler using /nologo flag.
Peter Collingbourne [Thu, 18 Jun 2015 01:15:18 +0000 (01:15 +0000)]
Silence resource compiler using /nologo flag.

llvm-svn: 239983

9 years agoCOFF: Fix entry point inference bug.
Rui Ueyama [Thu, 18 Jun 2015 00:40:33 +0000 (00:40 +0000)]
COFF: Fix entry point inference bug.

Previously, LLD couldn't find a default entry point if it's
defined by a library.

llvm-svn: 239982

9 years ago[Driver] Remove unused class member. NFC.
Alexey Samsonov [Thu, 18 Jun 2015 00:36:40 +0000 (00:36 +0000)]
[Driver] Remove unused class member. NFC.

llvm-svn: 239981

9 years ago[Driver] Simplify code choosing between MacOS and iOS platforms. NFC.
Alexey Samsonov [Thu, 18 Jun 2015 00:36:38 +0000 (00:36 +0000)]
[Driver] Simplify code choosing between MacOS and iOS platforms. NFC.

llvm-svn: 239980

9 years agoCOFF: Support /manifest{,uac,dependency,file} options.
Rui Ueyama [Thu, 18 Jun 2015 00:12:42 +0000 (00:12 +0000)]
COFF: Support /manifest{,uac,dependency,file} options.

The linker has to create an XML file for each executable.
This patch supports that feature.

You can optionally embed an XML file to an executable as .rsrc
section. If you choose to do that (by passing /manifest:embed
option), the linker has to create a textual resource file
containing an XML file, compile that using rc.exe to a binary
resource file, conver that resource file to a COFF file using
cvtres.exe, and then link that COFF file. This patch implements
that feature too.

llvm-svn: 239978

9 years ago[AsmPrinter] Make isRepeatedByteSequence smarter about odd integer types
Benjamin Kramer [Wed, 17 Jun 2015 23:55:17 +0000 (23:55 +0000)]
[AsmPrinter] Make isRepeatedByteSequence smarter about odd integer types

- zext the value to alloc size first, then check if the value repeats
  with zero padding included. If so we can still emit a .space
- Do the checking with APInt.isSplat(8), which handles non-pow2 types
- Also handle large constants (bit width > 64)
- In a ConstantArray all elements have the same type, so it's sufficient
  to check the first constant recursively and then just compare if all
  following constants are the same by pointer compare

llvm-svn: 239977

9 years agoRevert r239972 (YAML: Assign a value returned by the default constructor to the value...
Alex Lorenz [Wed, 17 Jun 2015 23:48:06 +0000 (23:48 +0000)]
Revert r239972 (YAML: Assign a value returned by the default constructor to the value in an optional mapping).

This change breaks clang-format tests.

llvm-svn: 239976

9 years agoAdd help for lldb-mi --source/-s option (MI)
Dawn Perchik [Wed, 17 Jun 2015 23:43:29 +0000 (23:43 +0000)]
Add help for lldb-mi --source/-s option (MI)

Test Plan: lldb-mi --interpreter --help
Reviewed By: clayborg, abidh
Differential Revision: http://reviews.llvm.org/D10489

llvm-svn: 239975

9 years agoDelete dead code. NFCI
Jonathan Roelofs [Wed, 17 Jun 2015 23:31:45 +0000 (23:31 +0000)]
Delete dead code. NFCI

llvm-svn: 239974

9 years agoAdd a test for expression evaluation while inferior is blocked in a syscall
Pavel Labath [Wed, 17 Jun 2015 23:28:55 +0000 (23:28 +0000)]
Add a test for expression evaluation while inferior is blocked in a syscall

Summary: The test is XFAILed for Linux x86_64 and i386 because of bug #23659.

Test Plan: NFC

Reviewers: tberghammer

Subscribers: lldb-commits, emaste

Differential Revision: http://reviews.llvm.org/D10519

llvm-svn: 239973

9 years agoYAML: Assign a value returned by the default constructor to the value in an optional...
Alex Lorenz [Wed, 17 Jun 2015 23:26:01 +0000 (23:26 +0000)]
YAML: Assign a value returned by the default constructor to the value in an optional mapping.

This commit ensures that a value that's passed into YAML's IO mapOptional method
is going to be assigned a value returned by the default constructor for that
value's type when the appropriate key is not present in the YAML mapping.

Reviewers: Duncan P. N. Exon Smith

Differential Revision: http://reviews.llvm.org/D10492

llvm-svn: 239972

9 years ago[analyzer] Cleanup: $Status is always 0 here.
Anton Yartsev [Wed, 17 Jun 2015 23:25:58 +0000 (23:25 +0000)]
[analyzer] Cleanup: $Status is always 0 here.

llvm-svn: 239971

9 years ago[analyzer] Close file handle before output to file from external command.
Anton Yartsev [Wed, 17 Jun 2015 23:12:33 +0000 (23:12 +0000)]
[analyzer] Close file handle before output to file from external command.

An old code caused problems under Windows - additional temporary file was created for clang preprocessor output while the right output file remained empty.

llvm-svn: 239970

9 years ago[modules] Ensure that if we merge the definitions of two enumerations, that
Richard Smith [Wed, 17 Jun 2015 23:07:50 +0000 (23:07 +0000)]
[modules] Ensure that if we merge the definitions of two enumerations, that
making either of them visible makes the merged definition visible.

llvm-svn: 239969

9 years agoAdd negative test for target.move-to-nearest-code=off using source location
Dawn Perchik [Wed, 17 Jun 2015 22:56:03 +0000 (22:56 +0000)]
Add negative test for target.move-to-nearest-code=off using source location

Test Plan: ./dotest.py --executable lldb -f MiBreakTestCase.test_lldbmi_break_insert_settings
Reviewed By: clayborg, abidh
Differential Revision: http://reviews.llvm.org/D10486

llvm-svn: 239968

9 years ago[Driver] Add an assert to Darwin::isTargetMacOS() for consistency.
Alexey Samsonov [Wed, 17 Jun 2015 22:51:12 +0000 (22:51 +0000)]
[Driver] Add an assert to Darwin::isTargetMacOS() for consistency.

llvm-svn: 239967

9 years ago[X86][SSE] Improved support for vector i16 to float conversions.
Simon Pilgrim [Wed, 17 Jun 2015 22:43:34 +0000 (22:43 +0000)]
[X86][SSE] Improved support for vector i16 to float conversions.

Added explicit sign extension for v4i16/v8i16 to v4i32/v8i32 before conversion to floats. Matches existing support for v4i8/v8i8.

Follow up to D10433

llvm-svn: 239966

9 years ago[TestLoadUnload] Enable for Android while skipping it for other remotes.
Siva Chandra [Wed, 17 Jun 2015 22:32:27 +0000 (22:32 +0000)]
[TestLoadUnload] Enable for Android while skipping it for other remotes.

Summary:
This change adds all the necessary infrastructure required to
selectively enable and make TestLoadUnload work for Android. One test,
which tests the module search paths, is still kept disabled for remote
as search paths (because of module caching) are local anyway.

Reviewers: tberghammer

Reviewed By: tberghammer

Subscribers: emaste, lldb-commits, tberghammer

Differential Revision: http://reviews.llvm.org/D10469

llvm-svn: 239965

9 years agoAdd NVPTXLowerAlloca pass to convert alloca'ed memory to local address
Jingyue Wu [Wed, 17 Jun 2015 22:31:02 +0000 (22:31 +0000)]
Add NVPTXLowerAlloca pass to convert alloca'ed memory to local address

Summary:
This is done by first adding two additional instructions to convert the
alloca returned address to local and convert it back to generic. Then
replace all uses of alloca instruction with the converted generic
address. Then we can rely NVPTXFavorNonGenericAddrSpace pass to combine
the generic addresscast and the corresponding Load, Store, Bitcast, GEP
Instruction together.

Patched by Xuetian Weng (xweng@google.com).

Test Plan: test/CodeGen/NVPTX/lower-alloca.ll

Reviewers: jholewinski, jingyue

Reviewed By: jingyue

Subscribers: meheff, broune, eliben, jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D10483

llvm-svn: 239964

9 years agoFix enum LanguageType values and language string table lookups.
Dawn Perchik [Wed, 17 Jun 2015 22:30:24 +0000 (22:30 +0000)]
Fix enum LanguageType values and language string table lookups.

Summary:
* Fix enum LanguageType values so that they can be used as indexes
into array language_names and g_languages as assumed by
LanguageRuntime::GetNameForLanguageType,
Language::SetLanguageFromCString and Language::AsCString.
* Add DWARFCompileUnit::LanguageTypeFromDWARF to convert from DWARF
DW_LANG_* values to enum LanguageType values.

Reviewed By: clayborg, abidh
Differential Revision: http://reviews.llvm.org/D10484

llvm-svn: 239963

9 years ago[Mips] Use new llvm-readobj -mips-reginfo flag to check .reginfo content
Simon Atanasyan [Wed, 17 Jun 2015 22:28:38 +0000 (22:28 +0000)]
[Mips] Use new llvm-readobj -mips-reginfo flag to check .reginfo content

No functional changes.

llvm-svn: 239962

9 years ago[Mips] Write inline some more relocation calculations
Simon Atanasyan [Wed, 17 Jun 2015 22:28:16 +0000 (22:28 +0000)]
[Mips] Write inline some more relocation calculations

No functional changes.

llvm-svn: 239961

9 years ago[Mips] Support R_MICROMIPS_GPREL16 / R_MICROMIPS_GPREL7_S2 relocations handling
Simon Atanasyan [Wed, 17 Jun 2015 22:27:54 +0000 (22:27 +0000)]
[Mips] Support R_MICROMIPS_GPREL16 / R_MICROMIPS_GPREL7_S2 relocations handling

llvm-svn: 239960

9 years ago[Mips] Support R_MIPS_16 relocation handling
Simon Atanasyan [Wed, 17 Jun 2015 22:27:39 +0000 (22:27 +0000)]
[Mips] Support R_MIPS_16 relocation handling

llvm-svn: 239959

9 years agoRevert "[Sanitizers] Provide better diagnostic for sanitizers unsupported for target...
Alexey Samsonov [Wed, 17 Jun 2015 22:27:32 +0000 (22:27 +0000)]
Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple."

This reverts commit r239953, while I'm investigating assertion
failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/

llvm-svn: 239958

9 years ago[Mips] Do not use functions to calculate trivial relocations
Simon Atanasyan [Wed, 17 Jun 2015 22:27:27 +0000 (22:27 +0000)]
[Mips] Do not use functions to calculate trivial relocations

No functional changes.

llvm-svn: 239957

9 years ago[CMake] Remove redundant checks in TSan CMakeLists.txt
Alexey Samsonov [Wed, 17 Jun 2015 22:24:49 +0000 (22:24 +0000)]
[CMake] Remove redundant checks in TSan CMakeLists.txt

llvm-svn: 239956

9 years ago[CMake] LSan is not actually available on Darwin.
Alexey Samsonov [Wed, 17 Jun 2015 22:24:44 +0000 (22:24 +0000)]
[CMake] LSan is not actually available on Darwin.

llvm-svn: 239955

9 years ago[modules] Fix typo in default argument merging.
Richard Smith [Wed, 17 Jun 2015 22:13:23 +0000 (22:13 +0000)]
[modules] Fix typo in default argument merging.

llvm-svn: 239954

9 years ago[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.
Alexey Samsonov [Wed, 17 Jun 2015 22:07:28 +0000 (22:07 +0000)]
[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.

Summary:
Introduce ToolChain::getSupportedSanitizers() that would return the set
of sanitizers available on given toolchain. By default, these are
sanitizers which don't necessarily require runtime support (i.e.
set from -fsanitize=undefined-trap).

Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function
without runtime library are marked as supported only on platforms
for which we actually build these runtimes.

This would allow more fine-grained checks in the future: for instance,
we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+
(PR23539)

Update test cases accrodingly: add tests for certain unsupported
configurations, remove test cases for -fsanitize=vptr + PS4
integration, as we don't build the runtime for PS4 at the moment.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith

Differential Revision: http://reviews.llvm.org/D10467

llvm-svn: 239953

9 years agoDevirtualize and pack MCFragment to reduce memory usage.
Pete Cooper [Wed, 17 Jun 2015 22:01:28 +0000 (22:01 +0000)]
Devirtualize and pack MCFragment to reduce memory usage.

MCFragment didn't really need vtables.  The majority of virtual methods were just getters and setters.

This removes the vtables and uses dispatch on the kind to do things like delete which needs to
get the appropriate class.

This reduces memory on the verify use list order test case by about 2MB out of 800MB.

Reviewed by Rafael EspĂ­ndola

llvm-svn: 239952

9 years ago[ELF] Now that there's an API for ELF symbol types in LLVM, use it.
Davide Italiano [Wed, 17 Jun 2015 21:50:51 +0000 (21:50 +0000)]
[ELF] Now that there's an API for ELF symbol types in LLVM, use it.

Common symbols will be handled in a separate patch because it seems
Hexagon redefines the notion of common symbol, which I'm not (yet)
very familiar with.

llvm-svn: 239951

9 years agoRe-land "[X86] Cache variables that only depend on the subtarget"
Reid Kleckner [Wed, 17 Jun 2015 21:50:02 +0000 (21:50 +0000)]
Re-land "[X86] Cache variables that only depend on the subtarget"

Re-instates r239949 without accidentally flipping the sense of UseLEA.

llvm-svn: 239950

9 years agoRevert "[X86] Cache variables that only depend on the subtarget"
Reid Kleckner [Wed, 17 Jun 2015 21:35:02 +0000 (21:35 +0000)]
Revert "[X86] Cache variables that only depend on the subtarget"

This reverts commit r239948, tests seem to be failing.

llvm-svn: 239949

9 years ago[X86] Cache variables that only depend on the subtarget
Reid Kleckner [Wed, 17 Jun 2015 21:31:17 +0000 (21:31 +0000)]
[X86] Cache variables that only depend on the subtarget

There is a one-to-one relationship between X86Subtarget and
X86FrameLowering, but every frame lowering method would previously pull
the subtarget off the MachineFunction and query some subtarget
properties.

Over time, these locals began to grow in complexity and it became
important to keep their names and meaning in sync across all of the
frame lowering methods, leading to duplication. We can eliminate that
duplication by computing them once in the constructor.

llvm-svn: 239948

9 years ago[docs] Fix "WARNING: Title underline too short."
David Majnemer [Wed, 17 Jun 2015 21:21:16 +0000 (21:21 +0000)]
[docs] Fix "WARNING: Title underline too short."

llvm-svn: 239947

9 years agoAdd missing include.
Benjamin Kramer [Wed, 17 Jun 2015 21:08:22 +0000 (21:08 +0000)]
Add missing include.

llvm-svn: 239946

9 years agoCOFF: Simplify. NFC.
Rui Ueyama [Wed, 17 Jun 2015 21:01:56 +0000 (21:01 +0000)]
COFF: Simplify. NFC.

Executor is a convenience class to run an external command.

llvm-svn: 239945

9 years ago[Bitcode] Replace hand-coded little endian handling with Endian.h functions.
Benjamin Kramer [Wed, 17 Jun 2015 20:55:30 +0000 (20:55 +0000)]
[Bitcode] Replace hand-coded little endian handling with Endian.h functions.

No functional change intended.

llvm-svn: 239944

9 years agoAMDGPU: Change unreachable into reported error
Matt Arsenault [Wed, 17 Jun 2015 20:55:25 +0000 (20:55 +0000)]
AMDGPU: Change unreachable into reported error

llvm-svn: 239943

9 years agoremove unnecessary casts; NFC
Sanjay Patel [Wed, 17 Jun 2015 20:54:46 +0000 (20:54 +0000)]
remove unnecessary casts; NFC

llvm-svn: 239942

9 years agoUpdate clang to take into account the changes to personality fns
David Majnemer [Wed, 17 Jun 2015 20:53:19 +0000 (20:53 +0000)]
Update clang to take into account the changes to personality fns

llvm-svn: 239941

9 years agoMove the personality function from LandingPadInst to Function
David Majnemer [Wed, 17 Jun 2015 20:52:32 +0000 (20:52 +0000)]
Move the personality function from LandingPadInst to Function

The personality routine currently lives in the LandingPadInst.

This isn't desirable because:
- All LandingPadInsts in the same function must have the same
  personality routine.  This means that each LandingPadInst beyond the
  first has an operand which produces no additional information.

- There is ongoing work to introduce EH IR constructs other than
  LandingPadInst.  Moving the personality routine off of any one
  particular Instruction and onto the parent function seems a lot better
  than have N different places a personality function can sneak onto an
  exceptional function.

Differential Revision: http://reviews.llvm.org/D10429

llvm-svn: 239940

9 years ago[CodeGenPrepare] Generalize inserted set from truncs to any inst.
Ahmed Bougacha [Wed, 17 Jun 2015 20:44:32 +0000 (20:44 +0000)]
[CodeGenPrepare] Generalize inserted set from truncs to any inst.

It's been used before to avoid infinite loops caused by separate CGP
optimizations undoing one another.  We found one more such issue
caused by r238054.  To avoid it, generalize the "InsertedTruncs"
set to any inst, and use it to avoid touching those again.

llvm-svn: 239938

9 years agoCOFF: Create import library files.
Rui Ueyama [Wed, 17 Jun 2015 20:40:43 +0000 (20:40 +0000)]
COFF: Create import library files.

On Windows, we have to create a .lib file for each .dll.
When linking against DLLs, the linker doesn't use the DLL files,
but instead read a list of dllexported symbols from corresponding
lib files.

A library file containing descriptors of a DLL is called an
import library file.

lib.exe has a feature to create an import library file from a
module-definition file. In this patch, we create a module-definition
file and pass that to lib.exe.

We eventually want to create an import library file by ourselves
to eliminate dependency to lib.exe. For now, we just use the MSVC
tool.

llvm-svn: 239937

9 years ago[modules] If we merge a template, also track that its parameters are merged so
Richard Smith [Wed, 17 Jun 2015 20:39:41 +0000 (20:39 +0000)]
[modules] If we merge a template, also track that its parameters are merged so
that we know when its default arguments should be visible.

llvm-svn: 239936

9 years ago[Hexagon] Adding a number of other tests for min/max instructions and loading i1s.
Colin LeMahieu [Wed, 17 Jun 2015 20:29:33 +0000 (20:29 +0000)]
[Hexagon] Adding a number of other tests for min/max instructions and loading i1s.

llvm-svn: 239935

9 years ago[modules] Improve diagnostic for a template-id that's invalid because a default
Richard Smith [Wed, 17 Jun 2015 20:16:32 +0000 (20:16 +0000)]
[modules] Improve diagnostic for a template-id that's invalid because a default
argument is not visible.

llvm-svn: 239934

9 years agoMove IsUsedInReloc from MCSymbolELF to MCSymbol.
Rafael Espindola [Wed, 17 Jun 2015 20:08:20 +0000 (20:08 +0000)]
Move IsUsedInReloc from MCSymbolELF to MCSymbol.

There is a free bit is MCSymbol and MachO needs the same information.

llvm-svn: 239933

9 years ago[ARM] Replace hard coded metadata arguments in tests with a regex.
Ranjeet Singh [Wed, 17 Jun 2015 19:56:30 +0000 (19:56 +0000)]
[ARM] Replace hard coded metadata arguments in tests with a regex.

Differential Revision: http://reviews.llvm.org/D10507

llvm-svn: 239932