Mohit K. Bhakkad [Thu, 18 Jun 2015 07:12:25 +0000 (07:12 +0000)]
A correction in rL239996
llvm-svn: 239998
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
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
Bruce Mitchener [Thu, 18 Jun 2015 05:27:05 +0000 (05:27 +0000)]
Fix a variety of typos.
No functional change.
llvm-svn: 239995
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
Peter Collingbourne [Thu, 18 Jun 2015 05:10:06 +0000 (05:10 +0000)]
LTO: Introduce LTOModule::getSymbolGV().
llvm-svn: 239993
Tobias Grosser [Thu, 18 Jun 2015 05:02:11 +0000 (05:02 +0000)]
Adjust to personality function change in 239940
llvm-svn: 239992
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
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
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
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
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
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
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
Jingyue Wu [Thu, 18 Jun 2015 03:35:57 +0000 (03:35 +0000)]
[NFC] more comments in SLSR
llvm-svn: 239984
Peter Collingbourne [Thu, 18 Jun 2015 01:15:18 +0000 (01:15 +0000)]
Silence resource compiler using /nologo flag.
llvm-svn: 239983
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
Alexey Samsonov [Thu, 18 Jun 2015 00:36:40 +0000 (00:36 +0000)]
[Driver] Remove unused class member. NFC.
llvm-svn: 239981
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
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
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
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
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
Jonathan Roelofs [Wed, 17 Jun 2015 23:31:45 +0000 (23:31 +0000)]
Delete dead code. NFCI
llvm-svn: 239974
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
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
Anton Yartsev [Wed, 17 Jun 2015 23:25:58 +0000 (23:25 +0000)]
[analyzer] Cleanup: $Status is always 0 here.
llvm-svn: 239971
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
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
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
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
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
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
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
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
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
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
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
Simon Atanasyan [Wed, 17 Jun 2015 22:27:39 +0000 (22:27 +0000)]
[Mips] Support R_MIPS_16 relocation handling
llvm-svn: 239959
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
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
Alexey Samsonov [Wed, 17 Jun 2015 22:24:49 +0000 (22:24 +0000)]
[CMake] Remove redundant checks in TSan CMakeLists.txt
llvm-svn: 239956
Alexey Samsonov [Wed, 17 Jun 2015 22:24:44 +0000 (22:24 +0000)]
[CMake] LSan is not actually available on Darwin.
llvm-svn: 239955
Richard Smith [Wed, 17 Jun 2015 22:13:23 +0000 (22:13 +0000)]
[modules] Fix typo in default argument merging.
llvm-svn: 239954
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
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
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
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
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
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
David Majnemer [Wed, 17 Jun 2015 21:21:16 +0000 (21:21 +0000)]
[docs] Fix "WARNING: Title underline too short."
llvm-svn: 239947
Benjamin Kramer [Wed, 17 Jun 2015 21:08:22 +0000 (21:08 +0000)]
Add missing include.
llvm-svn: 239946
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
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
Matt Arsenault [Wed, 17 Jun 2015 20:55:25 +0000 (20:55 +0000)]
AMDGPU: Change unreachable into reported error
llvm-svn: 239943
Sanjay Patel [Wed, 17 Jun 2015 20:54:46 +0000 (20:54 +0000)]
remove unnecessary casts; NFC
llvm-svn: 239942
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
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
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
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
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
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
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
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
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
Rui Ueyama [Wed, 17 Jun 2015 19:28:01 +0000 (19:28 +0000)]
COFF: Fix a test which was failing with debug build.
llvm-svn: 239931
Rui Ueyama [Wed, 17 Jun 2015 19:19:25 +0000 (19:19 +0000)]
COFF: Support module-definition files.
Module-definition files (.def files) are yet another way to
specify parameters to the linker. You can write a list of dllexported
symbols in module-definition files instead of using /export command
line option. It also supports a few more directives.
The parser code is taken from lib/Driver/WinLinkModuleDef.cpp
with the following modifications.
- variable names are updated to comply with the LLVM coding style.
- Instead of returning parsing results as "directive" objects,
it updates Config object directly.
llvm-svn: 239929
Peter Collingbourne [Wed, 17 Jun 2015 19:08:05 +0000 (19:08 +0000)]
CodeGen: Factor out some of the bitset entry creation code. NFC.
llvm-svn: 239927
Eric Christopher [Wed, 17 Jun 2015 18:42:07 +0000 (18:42 +0000)]
Move xtest to its own file to match the gcc header organization.
llvm-svn: 239926
Eric Christopher [Wed, 17 Jun 2015 18:42:03 +0000 (18:42 +0000)]
Update comments on HLE, RTM, and ADX support for intrinsics.
llvm-svn: 239925
Pavel Labath [Wed, 17 Jun 2015 18:38:49 +0000 (18:38 +0000)]
[NativeProcessLinux] Use fast memory reads, if the system supports it
Summary:
Memory reads using the ptrace API need to be executed on a designated thread
and in 4-byte increments. The process_vm_read syscall has no such requirements
and it is about 50 times faster. This patch makes lldb-server use the faster
API if the target kernel supports it. Kernel support for this feature is
determined at runtime. Using process_vm_writev in the same manner is more
complicated since this syscall (unlike ptrace) respects page protection settings
and so it cannot be used to set a breakpoint, since code pages are typically
read-only. However, memory writes are not currently a performance bottleneck as
they happen much more rarely.
Test Plan: all tests continue to pass
Reviewers: ovyalov, vharron
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10488
llvm-svn: 239924
Peter Collingbourne [Wed, 17 Jun 2015 18:31:02 +0000 (18:31 +0000)]
LowerBitSets: Do not assign names to aliases of unnamed bitset element objects.
The restriction on unnamed aliases was removed in r239921. Mostly reverts
r239590, but we keep the test.
llvm-svn: 239923
Rafael Espindola [Wed, 17 Jun 2015 17:53:31 +0000 (17:53 +0000)]
Allow aliases to be unnamed.
If globals can be unnamed, there is no reason for aliases to be different.
The restriction was there since the original implementation in r36435. I
can only guess it was there because of the old bison parser for the old
alias syntax.
llvm-svn: 239921
Reid Kleckner [Wed, 17 Jun 2015 17:47:30 +0000 (17:47 +0000)]
[fixit] Use overwriteChangedFiles() to deal with Windows mapped files
Fixes one instance of PR17960.
llvm-svn: 239920
Rafael Espindola [Wed, 17 Jun 2015 17:33:37 +0000 (17:33 +0000)]
Use a range loop. NFC.
llvm-svn: 239919
Ed Maste [Wed, 17 Jun 2015 17:29:56 +0000 (17:29 +0000)]
Correct type in for loop to remove signedness warning
llvm-svn: 239918
Colin LeMahieu [Wed, 17 Jun 2015 17:19:05 +0000 (17:19 +0000)]
[Hexagon] Adding some compare tests, fixing existing XFAILed tests, and removing mcpu=hexagonv4 since that's the minimum version anyway.
llvm-svn: 239917
Sanjay Patel [Wed, 17 Jun 2015 16:34:48 +0000 (16:34 +0000)]
fix typos in comments; NFC
llvm-svn: 239916
Diego Novillo [Wed, 17 Jun 2015 16:28:22 +0000 (16:28 +0000)]
Add documentation for new backedge mass propagation in irregular loops.
Tweak test cases and rename headerIndexFor -> getHeaderIndex.
llvm-svn: 239915
Rafael Espindola [Wed, 17 Jun 2015 16:26:47 +0000 (16:26 +0000)]
Use named temporaries for directional labels.
Directional labels can show up in symbol tables (and we have a llvm-mc test for
that). Given that, we need to make sure they are named.
With that out of the way, use setUseNamesOnTempLabels in llvm-mc so that it
too benefits from the memory saving.
llvm-svn: 239914
Benjamin Kramer [Wed, 17 Jun 2015 16:02:56 +0000 (16:02 +0000)]
[ArchiveWriter] Use EndianStream. No functional change intended.
llvm-svn: 239913
Jonathan Peyton [Wed, 17 Jun 2015 15:43:34 +0000 (15:43 +0000)]
Have CMake error out on Windows when user wants OMPT support
Currently, OMPT support requires the weak attribute which isn't supported
on Windows. This patch has CMake error out when LIBOMP_OMPT_SUPPORT=true
and the users is building on Windows.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000692.html
Patch by Jonas Hahnfeld
llvm-svn: 239912
Benjamin Kramer [Wed, 17 Jun 2015 15:14:35 +0000 (15:14 +0000)]
[MC/Dwarf] Encode DW_CFA_advance_loc in target endianess.
This matches GNU as output.
llvm-svn: 239911
Toma Tabacu [Wed, 17 Jun 2015 14:31:51 +0000 (14:31 +0000)]
[mips] [IAS] Add support for expanding LASym with a source register operand.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9348
llvm-svn: 239910
Daniel Marjamaki [Wed, 17 Jun 2015 14:19:35 +0000 (14:19 +0000)]
clang-tidy: Add checker that warn when macro argument with side effects is repeated in the macro
llvm-svn: 239909
Adhemerval Zanella [Wed, 17 Jun 2015 14:00:12 +0000 (14:00 +0000)]
[ELF/x86_64] Fix initial-exec TLS access
Current approach for initial-exec in ELF/x86_64 is to create a GOT entry
and change the relocation to R_X86_64_PC32 to be handled as a GOT offfset.
However there are two issues with this approach: 1. the R_X86_64_PC32 is
not really required since the GOT relocation will be handle dynamically and
2. the TLS symbols are not being exported externally and then correct
realocation are not being applied.
This patch fixes the R_X86_64_GOTTPOFF handling by just emitting a
R_X86_64_TPOFF64 dynamically one; it also sets R_X86_64_TPOFF64 to be
handled by runtime one. For second part, the patches uses a similar
strategy used for aarch64, by reimplementing buildDynamicSymbolTable
from X86_64ExecutableWriter and adding the TLS symbols in the dynamic
symbol table.
Some tests had to be adjusted due the now missing R_X86_64_PC32 relocation.
With this test the simple testcase:
* t1.c:
__thread int t0;
__thread int t1;
__thread int t2;
__thread int t3;
* t0.c:
extern __thread int t0;
extern __thread int t1;
extern __thread int t2;
extern __thread int t3;
__thread int t4;
__thread int t5;
__thread int t6;
__thread int t7;
int main ()
{
t0 = 1;
t1 = 2;
t2 = 3;
t3 = 4;
t4 = 5;
t5 = 6;
t6 = 7;
t7 = 8;
printf ("%i %i %i %i\n", t0, t1, t2, t3);
printf ("%i %i %i %i\n", t4, t5, t6, t7);
return 0;
}
Shows correct output for x86_64.
llvm-svn: 239908
James Y Knight [Wed, 17 Jun 2015 13:53:12 +0000 (13:53 +0000)]
Tweak wording of alignment static_assert messages.
llvm-svn: 239907
Adhemerval Zanella [Wed, 17 Jun 2015 13:46:07 +0000 (13:46 +0000)]
[ELF] Fix wrong TBSS size
This patch fixes the wrong .tbss segment size generated for cases where
multiple modules have non initialized threads variables. For instance:
* t0.c
__thread int x0;
__thread int x1;
__thread int x2;
extern __thread int e0;
extern __thread int e1;
extern __thread int e2;
extern __thread int e3;
int foo0 ()
{
return x0;
}
int main ()
{
return x0;
}
* t1.c
__thread int e0;
__thread int e1;
__thread int e2;
__thread int e3;
lld is generating (for aarch64):
[14] .tbss NOBITS
0000000000401000 00001000
0000000000000010 0000000000000000 WAT 0 0 4
Where is just taking in consideration the largest tbss segment, not all
from all objects. ld generates a correct output:
[17] .tbss NOBITS
0000000000410dec 00000dec
000000000000001c 0000000000000000 WAT 0 0 4
This issue is at 'lib/ReaderWriter/ELF/SegmentChunks.cpp' where
Segment<ELFT>::assignVirtualAddress is setting wrong slice values, not taking care
of although tbss segments file size does noy play role in other segment virtual
address placement, its size should still be considered.
llvm-svn: 239906
Toma Tabacu [Wed, 17 Jun 2015 13:20:24 +0000 (13:20 +0000)]
[mips] [IAS] Add support for the B{L,G}{T,E}(U) branch pseudo-instructions.
Summary:
This does not include support for the immediate variants of these pseudo-instructions.
Fixes llvm.org/PR20968.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: seanbruno, emaste, llvm-commits
Differential Revision: http://reviews.llvm.org/D8537
llvm-svn: 239905
Alexander Kornienko [Wed, 17 Jun 2015 13:11:37 +0000 (13:11 +0000)]
[clang-tidy] Move user-defined matches to unnamed namespaces to prevent ODR violations.
llvm-svn: 239904
Daniel Jasper [Wed, 17 Jun 2015 13:08:06 +0000 (13:08 +0000)]
clang-format: clang-format (NFC)
llvm-svn: 239903
Alexander Kornienko [Wed, 17 Jun 2015 12:49:00 +0000 (12:49 +0000)]
Qualify all types used in AST matcher macros.
Summary:
Qualify all types used in AST matcher macros. This makes it possible to
put AST matchers in user code into a namespace other than clang::ast_matchers
and this way prevent ODR violations that could happen when a matcher with the
same name is defined in multiple translation units. Updated comments
accordingly.
Reviewers: djasper, klimek
Reviewed By: djasper, klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D10501
llvm-svn: 239902
Toma Tabacu [Wed, 17 Jun 2015 12:30:37 +0000 (12:30 +0000)]
[mips] [IAS] Fix LA with relative label operands.
Summary:
Call MCSymbolRefExpr::create() with a MCSymbol* argument, not with a StringRef
of the Symbol's name, in order to avoid creating invalid temporary symbols for
relative labels (e.g. {$,.L}tmp00, {$,.L}tmp10 etc.).
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10498
llvm-svn: 239901
Daniel Jasper [Wed, 17 Jun 2015 12:23:15 +0000 (12:23 +0000)]
clang-format: Don't generate unnecessary replacements for \r\n line endings.
Patch by Mathieu Champlon. Thank you.
llvm-svn: 239900
Toma Tabacu [Wed, 17 Jun 2015 11:46:37 +0000 (11:46 +0000)]
[mips] [IAS] Add test for SW with relative label operands. NFC.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10497
llvm-svn: 239899
Alexander Kornienko [Wed, 17 Jun 2015 11:31:18 +0000 (11:31 +0000)]
Remove empty directories left after r239657
llvm-svn: 239898
Toma Tabacu [Wed, 17 Jun 2015 10:43:45 +0000 (10:43 +0000)]
[mips] [IAS] Fix LW with relative label operands.
Summary:
Previously, MCSymbolRefExpr::create() was called with a StringRef of the symbol
name, which it would then search for in the Symbols StringMap (from MCContext).
However, relative labels (which are temporary symbols) are apparently not stored
in the Symbols StringMap, so we end up creating a new {$,.L}tmp symbol
({$,.L}tmp00, {$,.L}tmp10 etc.) each time we create an MCSymbolRefExpr by
passing in the symbol name as a StringRef.
Fortunately, there is a version of MCSymbolRefExpr::create() which takes an
MCSymbol* and we already have an MCSymbol* at that point, so we can just pass
that in instead of the StringRef.
I also removed the local StringRef calls to MCSymbolRefExpr::create() from
expandMemInst(), as those cases can be handled by evaluateRelocExpr() anyway.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9938
llvm-svn: 239897
NAKAMURA Takumi [Wed, 17 Jun 2015 10:40:51 +0000 (10:40 +0000)]
Fix clang/test/Headers/x86intrin-2.c. _readfsbase_u32() is provided in not i686 but x86-64.
llvm-svn: 239896
Alexey Bataev [Wed, 17 Jun 2015 09:51:18 +0000 (09:51 +0000)]
[OPENMP] Fixed failed test for reduction clause in simd constructs.
llvm-svn: 239895
Daniel Jasper [Wed, 17 Jun 2015 09:44:07 +0000 (09:44 +0000)]
clang-format: [JS] Don't put top-level typescript enums on a single line.
This makes this consistent with non-typescript enums.
Also shuffle the language-dependent stuff in mustBreakBefore to a
single location.
Patch initiated by Martin Probst.
llvm-svn: 239894