summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [profiling] Fix profile counter increment when emitting selects (PR32019)Vedant Kumar2017-02-255-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | Clang has logic to lower certain conditional expressions directly into llvm select instructions. However, it does not emit the correct profile counter increment as it does this: it emits an unconditional increment of the counter for the 'then branch', even if the value selected is from the 'else branch' (this is PR32019). That means, given the following snippet, we would report that "0" is selected twice, and that "1" is never selected: int f1(int x) { return x ? 0 : 1; ^2 ^0 } f1(0); f1(1); Fix the problem by using the instrprof_increment_step intrinsic to do the proper increment. llvm-svn: 296231
* Remove a default value that is always overwritten.Rui Ueyama2017-02-251-1/+1
| | | | llvm-svn: 296230
* Make function names consistent.Rui Ueyama2017-02-251-10/+10
| | | | | | Now a function to parse -foo-bar is always named getFooBar. llvm-svn: 296229
* AMDGPU/SI: export s_waitcnt builtinJan Vesely2017-02-251-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D30358 llvm-svn: 296228
* Do not handle -strip in a special way. NFC.Rui Ueyama2017-02-252-10/+12
| | | | llvm-svn: 296227
* Factor out code to parse -hash-style.Rui Ueyama2017-02-252-12/+14
| | | | llvm-svn: 296226
* Rename OMagic -> Omagic for consistency.Rui Ueyama2017-02-253-4/+4
| | | | llvm-svn: 296225
* Factor out code to parse -L and -rpath.Rui Ueyama2017-02-251-9/+16
| | | | llvm-svn: 296224
* Sort options. NFC.Rui Ueyama2017-02-251-53/+51
| | | | llvm-svn: 296223
* Minor code cleanup. NFC.Junmo Park2017-02-251-1/+1
| | | | llvm-svn: 296222
* [ODRHash] Move inherited visitor call to end of function.Richard Trieu2017-02-251-2/+2
| | | | llvm-svn: 296221
* Re-enable BinaryStreamTest.StreamReaderObject.Zachary Turner2017-02-252-34/+28
| | | | | | | I had an invalid pointer / size calculation that was causing a stack smash. Should be fixed now. llvm-svn: 296220
* Remove redundant code. NFC.Akira Hatanaka2017-02-251-4/+0
| | | | llvm-svn: 296219
* Clean up ObjCARCOpts.cpp. NFC.Akira Hatanaka2017-02-251-81/+7
| | | | | | | I removed unused functions and variables and moved variables closer to their uses. llvm-svn: 296218
* Disable BinaryStreamTest.StreamReaderObject temporarily.Zachary Turner2017-02-251-33/+33
| | | | | | This is crashing on some bots, so I need some time to investigate. llvm-svn: 296217
* Revert r296209, still one more test to go.Paul Robinson2017-02-251-5/+1
| | | | llvm-svn: 296216
* [PDB] General improvements to Stream library.Zachary Turner2017-02-2579-847/+1977
| | | | | | | | | | | | | | | This adds various new functionality and cleanup surrounding the use of the Stream library. Major changes include: * Renaming of all classes for more consistency / meaningfulness * Addition of some new methods for reading multiple values at once. * Full suite of unit tests for reader / writer functionality. * Full set of doxygen comments for all classes. * Streams now store their own endianness. * Fixed some bugs in a few of the classes that were discovered by the unit tests. llvm-svn: 296215
* [ubsan] Detect signed overflow UB in remainder operationsVedant Kumar2017-02-252-7/+14
| | | | | | | | | Teach ubsan to diagnose remainder operations which have undefined behavior due to signed overflow (e.g INT_MIN % -1). Differential Revision: https://reviews.llvm.org/D29437 llvm-svn: 296214
* [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)Vedant Kumar2017-02-254-120/+196
| | | | | | | | | | | | | | | | C requires the operands of arithmetic expressions to be promoted if their types are smaller than an int. Ubsan emits overflow checks when this sort of type promotion occurs, even if there is no way to actually get an overflow with the promoted type. This patch teaches clang how to omit the superflous overflow checks (addressing PR20193). Testing: check-clang and check-ubsan. Differential Revision: https://reviews.llvm.org/D29369 llvm-svn: 296213
* Remove svn:eol-style=native from Properties.Zachary Turner2017-02-250-0/+0
| | | | llvm-svn: 296212
* [PDB] Rename Stream related source files.Zachary Turner2017-02-2571-119/+119
| | | | | | | | | | | | | | This is part of a larger effort to get the Stream code moved up to Support. I don't want to do it in one large patch, in part because the changes are so big that it will treat everything as file deletions and add, losing history in the process. Aside from that though, it's just a good idea in general to make small changes. So this change only changes the names of the Stream related source files, and applies necessary source fix ups. llvm-svn: 296211
* [XRAY] A Color Choosing helper for XRay GraphDean Michael Berris2017-02-256-76/+308
| | | | | | | | | | | | | | | | | | | Summary: In Preparation for graph comparison, this patch breaks out the color choice code from xray-graph into a library and adds polynomials for the Sequential and Difference sets from ColorBrewer. Depends on D29005 Reviewers: dblaikie, chandlerc, dberris Reviewed By: dberris Subscribers: chandlerc, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D29363 llvm-svn: 296210
* [PS4] Set our default dialect to C++11. NFC for other targets.Paul Robinson2017-02-251-1/+5
| | | | llvm-svn: 296209
* [InlineCost] Move the code in isGEPOffsetConstant to a lambda.Easwaran Raman2017-02-251-13/+9
| | | | | | Differential revision: https://reviews.llvm.org/D30112 llvm-svn: 296208
* Minor code cleanup. NFC.Junmo Park2017-02-251-1/+1
| | | | llvm-svn: 296207
* [PGO] Directory name stripping in global identifier for static functionsRong Xu2017-02-252-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current internal option -static-func-full-module-prefix keeps all the directory path the profile counter names for static functions. The default of this option is false. This strips the directory names from the source filename which is problematic: (1) it creates linker errors for profile-generation compilation, exposed in our internal benchmarks. We are seeing messages like "warning: relocation refers to discarded section". This is due to the name conflicts after the stripping. (2) the stripping only applies to getPGOFuncName. Current Thin-LTO module importing for the indirect-calls assumes the source directory name not being stripped. Current default value for this option can potentially prevent some inter-module indirect-call-promotions. This patch turns the default value for -static-func-full-module-prefix to true. The second part of the patch is to have an alternative implementation under the internal option -static-func-strip-dirname-prefix=<value> This options specifies level of directories to be stripped from the source filename. Using a large value as the parameter has the same effect as -static-func-full-module-prefix. Differential Revision: http://reviews.llvm.org/D29512 llvm-svn: 296206
* [sancov] extending sancov --help documentationMike Aizatsky2017-02-241-2/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D30361 llvm-svn: 296205
* [WebAssembly] Add support for using a wasm global for the stack pointer.Dan Gohman2017-02-249-87/+221
| | | | | | | This replaces the __stack_pointer variable which was allocated in linear memory. llvm-svn: 296201
* [ODRHash] Finish FieldDecl support by handling mutable and initializers.Richard Trieu2017-02-244-3/+109
| | | | | | https://reviews.llvm.org/rL296170 llvm-svn: 296198
* [Hexagon] Undo shift folding where it could simplify addressing modeKrzysztof Parzyszek2017-02-242-3/+134
| | | | | | | | | | | | For example, avoid (single shift): r0 = and(##536870908,lsr(r0,#3)) r0 = memw(r1+r0<<#0) in favor of (two shifts): r0 = lsr(r0,#5) r0 = memw(r1+r0<<#2) llvm-svn: 296196
* [Test] Make Lit tests C++11 compatible #10Charles Li2017-02-246-44/+216
| | | | | | Differential Revision: https://reviews.llvm.org/D21626 llvm-svn: 296193
* [WebAssembly] Basic support for Wasm object file encoding.Dan Gohman2017-02-2464-389/+2074
| | | | | | | | | With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series toward migrating from ELF to general wasm object support. Note that this code and the binary format itself is still experimental. llvm-svn: 296190
* [.gitignore] Update .gitignore to ignore a nested build directoryChris Bieneman2017-02-241-0/+3
| | | | | | | | | | | | | | | | | Summary: A number of tools and common workflows include putting a build directory inside the source checkout under the folder "build". Adding this to .gitignore seems useful. As an example, the CMake Tools plugin for VSCode does this. Reviewers: chandlerc, echristo, zturner Reviewed By: zturner Subscribers: MatzeB, mehdi_amini, llvm-commits, jgosnell Differential Revision: https://reviews.llvm.org/D30346 llvm-svn: 296188
* [Hexagon] Prettify code in HexagonDAGToDAGISel::SelectKrzysztof Parzyszek2017-02-241-47/+13
| | | | llvm-svn: 296187
* AMDGPU : Replace FMAD with FMA when denormals are enabled.Wei Ding2017-02-245-2/+39
| | | | | | Differential Revision: http://reviews.llvm.org/D29958 llvm-svn: 296186
* [Test] Make Lit tests C++11 compatible #9Charles Li2017-02-2411-42/+273
| | | | | | | | [Test] Make Lit tests C++11 compatible #9 Differential Revision: https://reviews.llvm.org/D20710 llvm-svn: 296184
* [test] Try to link -latomic to provide atomics when availableMichal Gorny2017-02-243-1/+16
| | | | | | | | | | | | | | | | | | | When using -rtlib=libgcc, the fallback implementation of __atomic_* builtins is provided via libatomic (included in GCC). However, neither GCC itself nor clang link libatomic implicitly, and it seems that GCC upstream expects projects to link it explicitly as necessary. Since compiler-rt provides __atomic_* builtins directly in the main library, check if they are provided by the default libraries first. If they are not, check if -latomic is available to provide them and add explicit -latomic for tests in this case. This fixes unresolved __atomic_load() references when running openmp tests on i386 with libgcc backend. Differential Revision: https://reviews.llvm.org/D30083 llvm-svn: 296183
* Revert "Correct register pressure calculation in presence of subregs"Stanislav Mekhanoshin2017-02-249-155/+30
| | | | | | | | This reverts commit r296009. It broke one out of tree target and also does not account for all partial lines added or removed when calculating PressureDiff. llvm-svn: 296182
* [utils] allow auto-generation of checks for thumb triplesSanjay Patel2017-02-241-0/+2
| | | | | | | If there's some reason not to do this, feel free to revert and/or fix, but for the cases I'm looking at, the script appears to do fine for these targets. llvm-svn: 296181
* Disallow redefinition of section symbols.Evgeniy Stepanov2017-02-246-143/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D30235 llvm-svn: 296180
* Initialize MCContext::InlineSrcMgr in the constructor.Evgeniy Stepanov2017-02-241-2/+3
| | | | | | Found with ASan (and a local source change) on test/CodeGen/XCore/section-name.ll. llvm-svn: 296179
* [ARM] add tests for alternate forms of select-of-constants; NFCSanjay Patel2017-02-241-0/+33
| | | | llvm-svn: 296178
* [WebAssembly] Define an initial set of relocation types for Wasm.Dan Gohman2017-02-242-0/+17
| | | | | | This set will likely evolve, along with the Wasm linking ABI. llvm-svn: 296177
* GlobalISel: check for CImm rather than Imm on G_CONSTANTs.Tim Northover2017-02-242-6/+8
| | | | | | | All G_CONSTANTS created by the MachineIRBuilder have an operand of type CImm (i.e. a ConstantInt), so that's what the selector needs to look for. llvm-svn: 296176
* [ARM] auto-generate complete checks; NFCSanjay Patel2017-02-241-8/+34
| | | | | | | The affected test may change with a patch I'm looking at for DAGCombiner, so I want to make sure it's not a regression. llvm-svn: 296175
* Factor out more commonality between handling of deletion and exception ↵Richard Smith2017-02-241-86/+128
| | | | | | specifications for special member functions. llvm-svn: 296173
* [WebAssembly] Handle f16 in fast-isel.Dan Gohman2017-02-242-0/+3
| | | | llvm-svn: 296172
* Try to unbreak tests after r296166Nico Weber2017-02-241-1/+1
| | | | | | | | Looks like %T isn't per-test but per-test-directory, and the rm was deleting temp files written by other tests in test/Format. Limit the rm's scope a bit. llvm-svn: 296171
* [ODRHash] Add handling of bitfieldsRichard Trieu2017-02-244-2/+94
| | | | | | Differential Revision: https://reviews.llvm.org/D21675 llvm-svn: 296170
* Fix Indentation. NFCIXin Tong2017-02-241-2/+2
| | | | llvm-svn: 296169
OpenPOWER on IntegriCloud