- Dec 13, 2018
-
-
Mircea Trofin authored
Summary: Macros are expanded on a single line. In case of large expansions, with sufficiently many instructions with memory operands (and when -fdebug-info-for-profiling is requested), we may be unable to generate new base discriminator values - new values overflow (base discriminators may not be larger than 2^12). This CL warns instead of asserting in such a case. A subsequent CL will add APIs to check for overflow before creating new debug info. See https://bugs.llvm.org/show_bug.cgi?id=39890 Reviewers: davidxl, wmi, gbedwell Reviewed By: davidxl Subscribers: aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D55643 llvm-svn: 349075
-
Jordan Rupprecht authored
[llvm-size][libobject] Add explicit "inTextSegment" methods similar to "isText" section methods to calculate size correctly. Summary: llvm-size uses "isText()" etc. which seem to indicate whether the section contains code-like things, not whether or not it will actually go in the text segment when in a fully linked executable. The unit test added (elf-sizes.test) shows some types of sections that cause discrepencies versus the GNU size tool. llvm-size is not correctly reporting sizes of things mapping to text/data segments, at least for ELF files. This fixes pr38723. Reviewers: echristo, Bigcheese, MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54369 llvm-svn: 349074
-
Hyrum Wright authored
Summary: This check uses the context of a subtraction expression as well as knowledge about the Abseil Time types, to infer the type of the second operand of some subtraction expressions in Duration conversions. For example: absl::ToDoubleSeconds(duration) - foo can become absl::ToDoubleSeconds(duration - absl::Seconds(foo)) This ensures that time calculations are done in the proper domain, and also makes it easier to further deduce the types of the second operands to these expressions. Reviewed By: JonasToth Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D55245 llvm-svn: 349073
-
Craig Topper authored
[CostModel][X86] Don't count 2 shuffles on the last level of a pairwise arithmetic or min/max reduction This is split from D55452 with the correct patch this time. Pairwise reductions require two shuffles on every level but the last. On the last level the two shuffles are <1, u, u, u...> and <0, u, u, u...>, but <0, u, u, u...> will be dropped by InstCombine/DAGCombine as being an identity shuffle. Differential Revision: https://reviews.llvm.org/D55615 llvm-svn: 349072
-
Louis Dionne authored
llvm-svn: 349071
-
Stefan Granitz authored
Summary: When using Xcode to build LLVM with code signing, the post-build rule is executed even if the actual build-step was skipped. This causes double-signing errors. We can currently only avoid it by passing the `--force` flag. Plus some polishing for my previous patch D54443. Reviewers: beanz, kubamracek Reviewed By: kubamracek Subscribers: #lldb, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55116 llvm-svn: 349070
-
Davide Italiano authored
The actual type of the first argument of the @dbg intrinsic doesn't really matter as we're setting it to `undef`, but the bitcode reader is picky about `void` types. llvm-svn: 349069
-
Tom Stellard authored
Summary: llvm-config --cxxflags --cflags, should only output the minimal flags required to link against the llvm libraries. They currently contain all flags used to compile llvm including flags like -g, -pedantic, -Wall, etc, which users may not always want. This changes the llvm-config output to only include flags that have been explictly added to the COMPILE_FLAGS property of the llvm-config target by the llvm build system. llvm.org/PR8220 Output from llvm-config when running cmake with: cmake -G Ninja .. -DCMAKE_CXX_FLAGS=-funroll-loops Before: --cppflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings \ -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough \ -Wno-comment -fdiagnostics-color -g -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cxxflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include\ -funroll-loops -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall \ -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers \ -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized \ -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment \ -fdiagnostics-color -g -fno-exceptions -fno-rtti -D_GNU_SOURCE -D_DEBUG \ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" After: --cppflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cxxflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -std=c++11 -fno-exceptions -fno-rtti \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS Reviewers: sylvestre.ledru, infinity0, mgorny Reviewed By: sylvestre.ledru, mgorny Subscribers: mgorny, dmgreen, llvm-commits Differential Revision: https://reviews.llvm.org/D55391 llvm-svn: 349068
-
Zachary Turner authored
This patch adds support for parsing and evaluating local variables. using the native pdb plugin. Differential Revision: https://reviews.llvm.org/D55575 llvm-svn: 349067
-
Zachary Turner authored
When calling BinaryStreamArray::drop_front(), if the stream is skewed it means we must never drop the first bytes of the stream since offsets which occur in records assume the existence of those bytes. So if we want to skip the first record in a stream, then what we really want to do is just set the begin pointer to the next record. But we shouldn't actually remove those bytes from the underlying view of the data. llvm-svn: 349066
-
Adrian Prantl authored
The DIFile used by the CU is special and distinct from the main source file. Its directory part specifies what becomes the DW_AT_comp_dir (the compilation directory), even if the source file was specified with an absolute path. To support the .dwo workflow, a valid DW_AT_comp_dir is necessary even if source files were specified with an absolute path. llvm-svn: 349065
-
Sylvestre Ledru authored
With the new warning, we are showing one more output in the test. llvm-svn: 349064
-
Ilya Biryukov authored
Also reuses the same var for multiple to reduce the chance of accidentally referecing the previous test. llvm-svn: 349063
-
Greg Clayton authored
The MinidumpParser::GetFilteredModuleList() code was attempting to iterate through the entire module list and if it found more than one entry for a given module name, it wanted to pick the MinidumpModule with the lowest address. A bug existed where it wasn't doing that due to "exists" variable being inverted. "exists" was set to true if it was inserted, not if it existed. Furthermore, the order of the modules would be modified by sorting all modules from low address to high address (using MinidumpModule::base_of_image). This fix also maintains the original order which means your executable is at index 0 as intended instead of some random shared library. Tests were added to ensure this functionality doesn't regress. Differential Revision: https://reviews.llvm.org/D55614 llvm-svn: 349062
-
Ilya Biryukov authored
Found the case in the clang codebase where the assertion fires. To avoid crashing assertion-enabled builds before I re-add the missing operation. Will restore the assertion alongside the upcoming fix. llvm-svn: 349061
-
Francis Visoiu Mistrih authored
On 32-bit archs, before, we would assume that an indirect symbol will never have local linkage. This can lead to miscompiles where the symbol's value would be 0 and the linker would use that value, because the indirect symbol table would contain the value `INDIRECT_SYMBOL_LOCAL` for that specific symbol. Differential Revision: https://reviews.llvm.org/D55573 llvm-svn: 349060
-
David Green authored
Some versions of gcc, especially when invoked through ccache (-E), can have trouble with raw string literals inside macros. This moves the string out of the macro. llvm-svn: 349059
-
Sanjay Patel authored
[DAGCombiner] after simplifying demanded elements of vector operand of extract, revisit the extract; 2nd try This is a retry of rL349051 (reverted at rL349056). I changed the check for dead-ness from number of uses to an opcode test for DELETED_NODE based on existing similar code. Differential Revision: https://reviews.llvm.org/D55655 llvm-svn: 349058
-
Simon Pilgrim authored
llvm-svn: 349057
-
Sanjay Patel authored
revert rL349051: [DAGCombiner] after simplifying demanded elements of vector operand of extract, revisit the extract This causes an address sanitizer bot failure: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/27187/steps/check-llvm%20asan/logs/stdio llvm-svn: 349056
-
Daniel Sanders authored
Removed const from the ArrayRef<const EncodingAndInst> to avoid the std::vector<const EncodingAndInst> that G++ saw llvm-svn: 349055
-
Sylvestre Ledru authored
Summary: Patch by Arnaud Bienner Reviewers: sylvestre.ledru, thakis Reviewed By: thakis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55382 llvm-svn: 349054
-
Ilya Biryukov authored
Reviewers: kadircet Reviewed By: kadircet Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55648 llvm-svn: 349053
-
Simon Pilgrim authored
There's still a couple of minor SimplifyDemandedElts regressions in some of the shift amount splats that will be fixed in future patches. llvm-svn: 349052
-
Sanjay Patel authored
Differential Revision: https://reviews.llvm.org/D55655 llvm-svn: 349051
-
Ilya Biryukov authored
Reviewers: kadircet Reviewed By: kadircet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55431 llvm-svn: 349050
-
Eric Liu authored
Summary: Code completion will suggest symbols from any scope (incl. inaccessible scopes) when there's no qualifier explicitly specified. E.g. {F7689815} As we are assigning relatively low scores for cross-namespace completion items, the overall code completion quality doesn't regress. The feature has been tried out by a few folks, and the feedback is generally positive, so I think it should be ready to be enabled by default. Reviewers: hokein, ilya-biryukov, kadircet Reviewed By: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55649 llvm-svn: 349049
-
Daniel Cederman authored
Summary: The Sparc V9 membar instruction can enforce different types of memory orderings depending on the value in its immediate field. In the architectural manual the type is selected by combining different assembler tags into a mask. This patch adds support for these tags. Reviewers: jyknight, venkatra, brad Reviewed By: jyknight Subscribers: fedor.sergeev, jrtc27, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D53491 llvm-svn: 349048
-
Simon Pilgrim authored
llvm-svn: 349047
-
Daniel Sanders authored
One of the GCC based bots is objecting to a vector of const EncodingAndInst's: In file included from /usr/include/c++/8/vector:64, from /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/utils/TableGen/CodeGenInstruction.h:22, from /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp:15: /usr/include/c++/8/bits/stl_vector.h: In instantiation of 'class std::vector<const {anonymous}::EncodingAndInst, std::allocator<const {anonymous}::EncodingAndInst> >': /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp:375:32: required from here /usr/include/c++/8/bits/stl_vector.h:351:21: error: static assertion failed: std::vector must have a non-const, non-volatile value_type static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator static_assert(is_same<typename _Alloc::value_type, _Tp>::value, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-svn: 349046
-
Daniel Cederman authored
Summary: Constraining an integer value to a floating point register using "f" causes an llvm_unreachable to trigger. This patch allows i32 integers to be placed in a single precision float register and i64 integers to be placed in a double precision float register. This matches the behavior of GCC. For other types the llvm_unreachable is removed to instead trigger an error message that points out the offending line. Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: eraman, fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D51614 llvm-svn: 349045
-
Jinsong Ji authored
There are several Pseudo in PowerPC backend. eg: * ISel Pseudo-instructions , which has let usesCustomInserter=1 in td ExpandISelPseudos -> EmitInstrWithCustomInserter will deal with them. * Post-RA pseudo instruction, which has let isPseudo = 1 in td, or Standard pseudo (SUBREG_TO_REG,COPY etc.) ExpandPostRAPseudos -> expandPostRAPseudo will expand them * Multi-instruction pseudo operations will expand them PPCAsmPrinter::EmitInstruction * Pseudo instruction in CodeEmitter, which has encoding of 0. Currently, in td files, especially PPCInstrVSX.td, we did not distinguish Post-RA pseudo instruction and Pseudo instruction in CodeEmitter very clearly. This patch is to * Rename Pseudo<> class to PPCEmitTimePseudo, which means encoding of 0 in CodeEmitter * Introduce new class PPCPostRAExpPseudo <> for previous PostRA Pseudo * Introduce new class PPCCustomInserterPseudo <> for previous Isel Pseudo Differential Revision: https://reviews.llvm.org/D55143 llvm-svn: 349044
-
Daniel Sanders authored
llvm-svn: 349043
-
David Carlier authored
Reviewers: vitalybuka, krytarowski, emaste Reviewed By: emaste Differential Revision: https://reviews.llvm.org/D55622 llvm-svn: 349042
-
Daniel Sanders authored
Summary: Separate the concept of an encoding from an instruction. This will enable the definition of additional encodings for the same instruction which can be used to support variable length instruction sets in the disassembler (and potentially assembler but I'm not working towards that right now) without causing an explosion in the number of Instruction records that CodeGen then has to pick between. Reviewers: bogner, charukcs Reviewed By: bogner Subscribers: kparzysz, llvm-commits Differential Revision: https://reviews.llvm.org/D52366 llvm-svn: 349041
-
Simon Pilgrim authored
Merged the repeated code into a single if(). llvm-svn: 349040
-
Ivan Donchevskii authored
Extract code that forces linking to the separate header and include it in both plugin and standalone tool Differential Revision: https://reviews.llvm.org/D55595 llvm-svn: 349038
-
Jonas Paulsson authored
When computing register allocation hints for a GRX32Bit register, make sure that any of the hinted registers that are also copy hints are returned first in the list. Review: Ulrich Weigand. llvm-svn: 349037
-
Tatyana Krasnukha authored
llvm-svn: 349036
-
Daniel Sanders authored
Summary: Sometimes MIR-level passes create DILocations that were not present in the LLVM-IR. For example, it may merge two DILocations together to produce a DILocation that points to line 0. Previously, the address of these DILocations were printed which prevented the MIR from being read back into LLVM. With this patch, DILocations will use metadata references where possible and fall back on serializing them inline like so: MOV32mr %stack.0.x.addr, 1, _, 0, _, %0, debug-location !DILocation(line: 1, scope: !15) Reviewers: aprantl, vsk, arphaman Reviewed By: aprantl Subscribers: probinson, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D55243 llvm-svn: 349035
-