summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] [Darwin] Need to set lto_library on CMAKE_MODULE_LINKER_FLAGS as wellChris Bieneman2015-09-111-0/+2
| | | | | | This is a follow-on to r247308. llvm-svn: 247443
* [X86] Make sure startproc/endproc are pairedDavid Majnemer2015-09-112-1/+38
| | | | | | | | | | We used different conditions to determine if we should emit startproc vs endproc. Use the same condition to ensure that they will always be paired. This fixes PR24374. llvm-svn: 247435
* [IR] Print the label operands of a catchpad like an invokeReid Kleckner2015-09-114-9/+17
| | | | | | | | | | | | | The rest of the EH pads are fine, since they have at most one label and take fewer operands for the personality. Old catchpad vs. new: %5 = catchpad [i8* bitcast (i32 ()* @"\01?filt$0@0@main@@" to i8*)] to label %__except.ret.10 unwind label %catchendblock.9 ----- %5 = catchpad [i8* bitcast (i32 ()* @"\01?filt$0@0@main@@" to i8*)] to label %__except.ret.10 unwind label %catchendblock.9 llvm-svn: 247433
* [CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.Ahmed Bougacha2015-09-1111-57/+72
| | | | | | | | | | | | | | | We used to have this magic "hasLoadLinkedStoreConditional()" callback, which really meant two things: - expand cmpxchg (to ll/sc). - expand atomic loads using ll/sc (rather than cmpxchg). Remove it, and, instead, introduce explicit callbacks: - bool shouldExpandAtomicCmpXchgInIR(inst) - AtomicExpansionKind shouldExpandAtomicLoadInIR(inst) Differential Revision: http://reviews.llvm.org/D12557 llvm-svn: 247429
* [CodeGen] Rename AtomicRMWExpansionKind to AtomicExpansionKind.Ahmed Bougacha2015-09-119-26/+24
| | | | | | This lets us generalize its usage to the other atomic instructions. llvm-svn: 247428
* [PR24785] Appease MSC18 to tweak optimizations.NAKAMURA Takumi2015-09-111-0/+8
| | | | | | | | | | This brings a warning. cl : Command line warning D9035: option 'Og-' has been deprecated and will be removed in a future release We should resolve PR11951 to remove this tweak. llvm-svn: 247427
* [libFuzzer] mention more trophiesKostya Serebryany2015-09-111-0/+4
| | | | llvm-svn: 247425
* [mips] Add missing disassembler tests for MIPS64-MIPS64R5.Daniel Sanders2015-09-1112-0/+990
| | | | llvm-svn: 247422
* [mips] Add missing MIPS32 - MIPS32R5 disassembler tests.Daniel Sanders2015-09-1112-0/+869
| | | | llvm-svn: 247420
* [mips] Attempt to fix llvm-s390x-linux1Daniel Sanders2015-09-111-1/+1
| | | | | | It doesn't seem to like the '|&' in the test command. llvm-svn: 247418
* [mips] Add missing MIPS-IV disassembler tests.Daniel Sanders2015-09-113-0/+54
| | | | llvm-svn: 247417
* [mips] Add missing MIPS-III disassembler tests.Daniel Sanders2015-09-113-0/+48
| | | | llvm-svn: 247416
* Tweak 2 x86 gold tests so they can run on non-x86 platformsArnaud A. de Grandmaison2015-09-112-3/+5
| | | | llvm-svn: 247415
* [mips] Add missing MIPS-II disassembler tests.Daniel Sanders2015-09-113-0/+44
| | | | | | | These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723) and were verified by checking the disassembler output is accepted by GAS. llvm-svn: 247414
* Add #include llvm-config.h to Locale.cpp which depends on LLVM_ON_WIN32.Yaron Keren2015-09-111-0/+1
| | | | | | | | | | Source code was assuming that llvm-config.h would be included somehow but up to r247253 that added #include "llvm/Support/Compiler.h" to StringRef.h the config file was not actually included. The inclusion of llvm-config.h caused a change of behaviour in tools/clang/test/Frontend/source-col-map.c: previously it would output the original UTF-8 but now it outputs <U+03B1>. llvm-svn: 247409
* Re-commit r247405: [mips] Add missing MIPS-I disassembler tests.Daniel Sanders2015-09-114-0/+67
| | | | | | | | | | | | | These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723) and verified by checking the disassembler output is accepted by GAS. The problematic tests from the previous commit have been moved to valid-xfail.txt for now. Also, give invalid instructions some coverage. invalid-xfail.txt contains instructions that should be invalid but successfully disassemble. llvm-svn: 247407
* Revert r247405: [mips] Add missing MIPS-I disassembler tests.Daniel Sanders2015-09-111-29/+0
| | | | | | A small number of the added tests have operands that change on each round trip. llvm-svn: 247406
* [mips] Add missing MIPS-I disassembler tests.Daniel Sanders2015-09-111-0/+29
| | | | | | | These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723) and verified by checking the disassembler output is accepted by GAS. llvm-svn: 247405
* PPCFrameLowering::emitEpilogue(): Avoid manipulating MBBI on iterator end.NAKAMURA Takumi2015-09-111-1/+1
| | | | | | It caused crash in MachineInstr::hasPropertyInBundle() since r247237. llvm-svn: 247395
* Fix llvm/test/tools/gold/X86/bad-alias.ll.NAKAMURA Takumi2015-09-111-2/+2
| | | | llvm-svn: 247391
* [dsymutil] Discard useless location attributes.Frederic Riss2015-09-113-4/+116
| | | | | | | | | | | | | | When cloning the debug info for a function that hasn't been linked, strip the DIEs from all location attributes that wouldn't contain any meaningful information anyway. This kind of situation can happen when a function got discarded by the linker, but its debug information is still wanted in the final link because it was marked as required as some other DIE dependency. The easiest way to get into that situation is to have using directives. They get linked unconditionally, but their targets might not always be present. llvm-svn: 247386
* [dsymutil] Rename some variables NFC.Frederic Riss2015-09-111-11/+11
| | | | | | | lldb doesn't like having variables named as an existing type. In order to ease debugging, rename those variables to avoid that conflict. llvm-svn: 247385
* Fix the gold test cases after alias changesDavid Blaikie2015-09-111-1/+1
| | | | llvm-svn: 247381
* [opaque pointer type] Add textual IR support for explicit type parameter for ↵David Blaikie2015-09-11116-474/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global aliases update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
* [modules] Move ConvertUTF.h to a separate submodule that doesn't require C++.Richard Smith2015-09-111-0/+6
| | | | | | | The former setup once resulted in us ignoring the module for C compilations, but Clang now errors on this if the header is included from C code (which it is). llvm-svn: 247377
* Fixed a bug that BranchProbability is not defined in BlockFrequency.cpp. NFC.Cong Hou2015-09-112-2/+1
| | | | llvm-svn: 247376
* AsmWriter: Avoid O(N^2) processing of metadataDuncan P. N. Exon Smith2015-09-111-6/+8
| | | | | | | | | | | | | | | | | | Fix embarrassing bugs I introduced to the `SlotTracker` in or around r235785. I had us iterating through every instruction in a function (and hitting a map in the LLVMContext) for every basic block in the function. While there, completely avoid the call to `SlotTracker::processFunctionMetadata()` from `SlotTracker::processFunction()` if we've speculatively done this already in `SlotTracker::processModule()` by checking `ShouldInitializeAllMetadata` (this wasn't an algorithmic problem, but it's touching the same line of code). Fixes PR24699. llvm-svn: 247372
* Revert "[InstCombineCalls] Use isKnownNonNullAt() to check nullness of ↵Mehdi Amini2015-09-112-18/+1
| | | | | | | | | | | | | | | passing arguments at callsite" This reverts commit r247356. Breaks test/Transforms/InstCombine/pr8547.ll with: Wrong types for attribute: byval inalloca nest noalias nocapture nonnull readnone readonly sret dereferenceable(1) dereferenceable_or_null(1) %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 nonnull %conv2) #0 LLVM ERROR: Broken function found, compilation aborted! From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247371
* [libFuzzer] perform fewer crossover operations compared to plain mutationsKostya Serebryany2015-09-111-7/+8
| | | | llvm-svn: 247364
* Add .exe check to Execute to fix clang-modernize tests broken in r247358Reid Kleckner2015-09-101-0/+8
| | | | llvm-svn: 247361
* [modules] Add another .def file to our list of textual headers.Richard Smith2015-09-101-0/+1
| | | | llvm-svn: 247359
* ScanDirForExecutable on Windows fails to find executables with the "exe" ↵Reid Kleckner2015-09-103-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | extension in name When the driver tries to locate a program by its name, e.g. a linker, it scans the paths provided by the toolchain using the ScanDirForExecutable function. If the lookup fails, the driver uses llvm::sys::findProgramByName. Unlike llvm::sys::findProgramByName, ScanDirForExecutable is not aware of file extensions. If the program has the "exe" extension in its name, which is very common on Windows, ScanDirForExecutable won't find it under the toolchain-provided paths. This patch changes the Windows version of the "`can_execute`" function called by ScanDirForExecutable to respect file extensions, similarly to llvm::sys::findProgramByName. Patch by Oleg Ranevskyy Reviewers: rnk Differential Revision: http://reviews.llvm.org/D12711 llvm-svn: 247358
* Pass BranchProbability/BlockMass by value instead of const& as they are ↵Cong Hou2015-09-1017-65/+64
| | | | | | small. NFC. llvm-svn: 247357
* [InstCombineCalls] Use isKnownNonNullAt() to check nullness of passing ↵Chen Li2015-09-102-1/+18
| | | | | | | | | | | | | | arguments at callsite Summary: This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of passing arguments at callsite. In this way it can handle cases where the argument does not have nonnull attribute but has a dominating null check from the CFG. Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12779 llvm-svn: 247356
* Mark another method const. Sorry for missing this one the first time.Rafael Espindola2015-09-101-1/+1
| | | | llvm-svn: 247354
* [InstCombineCalls] Use isKnownNonNullAt() to check nullness of gc.relocate ↵Chen Li2015-09-102-1/+32
| | | | | | | | | | | | | | return value Summary: This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of gc.relocate return value. In this way it can handle cases where the relocated value does not have nonnull attribute but has a dominating null check from the CFG. Reviewers: reames Subscribers: llvm-commits, sanjoy Differential Revision: http://reviews.llvm.org/D12772 llvm-svn: 247353
* Remove gcc warning when comparing an unsigned var for >= 0Filipe Cabecinhas2015-09-101-1/+1
| | | | llvm-svn: 247352
* [WinEH] Push and pop EBP for 32-bit funcletsReid Kleckner2015-09-104-8/+24
| | | | | | | | The Win32 EH runtime caller does not preserve EBP, even though it does preserve the CSRs (EBX, ESI, EDI) for us. The result was that each finally funclet call would leave the frame pointer off by 12 bytes. llvm-svn: 247348
* AMDGPU: Simplify debug printingMatt Arsenault2015-09-103-13/+8
| | | | llvm-svn: 247345
* AMDGPU: Use StringRef valueMatt Arsenault2015-09-101-1/+1
| | | | llvm-svn: 247344
* [SPARC] Switch to the Machine Scheduler.James Y Knight2015-09-108-56/+59
| | | | | | | | | | | | | The (mostly-deprecated) SelectionDAG-based ILPListDAGScheduler scheduler was making poor scheduling decisions, causing high register pressure and extraneous register spills. Switching to the newer machine scheduler generates better code -- even without there being a machine model defined for SPARC yet. (Actually committing the test changes too, this time, unlike r247315) llvm-svn: 247343
* Mark two methods const.Rafael Espindola2015-09-101-4/+5
| | | | | | While at it, optimize getOffset a bit. llvm-svn: 247342
* Fix SEH state numbering algorithm to handle cleanupendpadsReid Kleckner2015-09-103-4/+228
| | | | | | | WinEHPrepare's new coloring algorithm really expects to see cleanupendpads now, so Clang will start emitting them soon. llvm-svn: 247341
* [LV] Relax Small Size Reduction Type RequirementMatthew Simpson2015-09-102-9/+80
| | | | | | | | | | | | | This patch enables small size reductions in which the source types are smaller than the reduction type (e.g., computing an i16 sum from the values in an i8 array). The previous behavior was to only allow small size reductions if the source types and reduction type were the same. The change accounts for the fact that the existing sign- and zero-extend instructions in these cases should still be included in the cost model. Differential Revision: http://reviews.llvm.org/D12770 llvm-svn: 247337
* [RuntimeDyld] Support non-zero addends for the MachO X86_64 SUBTRACTOR reloc.Lang Hames2015-09-102-4/+8
| | | | | | This functionality was accidentally left out of r247119. llvm-svn: 247336
* [RuntimeDyld] Fix a bug in debugging output: all sections should be dumpedLang Hames2015-09-101-2/+13
| | | | | | | | | | | before any relocations have been applied, and again after all relocations have been applied. Previously each section was dumped before and after relocations targetting it were applied, but this only shows the impact of relocations that point to other symbols in the same section. llvm-svn: 247335
* Add an explicit 'inline' specifier to these static functions. GCC isChandler Carruth2015-09-101-14/+14
| | | | | | | | warning on them having always_inline attribute for reasons I don't fully understand -- static functions are just as inlinable as inline functions in terms of linkage. llvm-svn: 247334
* Correct the return type of CreateCleanupEndPadReid Kleckner2015-09-101-2/+2
| | | | llvm-svn: 247331
* Revert "[SPARC] Switch to the Machine Scheduler."James Y Knight2015-09-102-6/+1
| | | | | | | | This reverts commit r247315. Accidentally omitted test changes; will resubmit full change shortly. llvm-svn: 247328
* [IR] Conservatively mark 'catchpad' as accessing memoryDavid Majnemer2015-09-101-0/+2
| | | | | | | | The exact semantics of 'catchpad' are really in the hands of the personality routine so we shouldn't assume that they have no side effects. llvm-svn: 247322
OpenPOWER on IntegriCloud