History log of /llvm-project/clang/lib/CodeGen/CodeGenModule.cpp (Results 1101 – 1125 of 2157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ba945626 28-Apr-2015 Bradley Smith <bradley.smith@arm.com>

[ARM/AArch64] Enforce alignment for bitfielded structs

When creating a global variable with a type of a struct with bitfields, we must
forcibly set the alignment of the global from the RecordDecl. W

[ARM/AArch64] Enforce alignment for bitfielded structs

When creating a global variable with a type of a struct with bitfields, we must
forcibly set the alignment of the global from the RecordDecl. We must do this so
that the proper bitfield alignment makes its way down to LLVM, since clang will
mangle the bitfields into one large type.

llvm-svn: 235976

show more ...


# 0488d1e4 27-Apr-2015 Artem Belevich <tra@google.com>

[cuda] treat file scope __asm as __host__ and ignore it during device-side compilation.

Currently clang emits file-scope asm during *both* host and device
compilation modes which is usually a wrong

[cuda] treat file scope __asm as __host__ and ignore it during device-side compilation.

Currently clang emits file-scope asm during *both* host and device
compilation modes which is usually a wrong thing to do.

There's no way to attach any attribute to an __asm statement, so
there's no way to differentiate between host-side and device-side
file-scope asm. This patch makes clang to match nvcc behavior and
emit file-scope-asm only during host-side compilation.

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

llvm-svn: 235905

show more ...


# 46084383 21-Apr-2015 Ulrich Weigand <ulrich.weigand@de.ibm.com>

Provide alignment info on LLVM external symbols

Code in CodeGenModule::GetOrCreateLLVMGlobal that sets up GlobalValue
object for LLVM external symbols has this comment:

// FIXME: This code is o

Provide alignment info on LLVM external symbols

Code in CodeGenModule::GetOrCreateLLVMGlobal that sets up GlobalValue
object for LLVM external symbols has this comment:

// FIXME: This code is overly simple and should be merged with other global
// handling.

One part does seems to be "overly simple" currently is that this code
never sets any alignment info on the GlobalValue, so that the emitted
IR does not have any align attribute on external globals. This can
lead to unnecessarily inefficient code generation.

This patch adds a GV->setAlignment call to set alignment info.

llvm-svn: 235396

show more ...


# 608e768d 15-Apr-2015 Nico Weber <nicolasweber@gmx.de>

Don't crash when a selectany symbol would get common linkage

Things can't both be in comdats and have common linkage, so never give things
in comdats common linkage. Common linkage is only used in .

Don't crash when a selectany symbol would get common linkage

Things can't both be in comdats and have common linkage, so never give things
in comdats common linkage. Common linkage is only used in .c files, and the
only thing that can trigger a comdat in c is selectany from what I can tell.
Fixes PR23243.

Also address an over-the-shoulder review comment from rnk by moving the
hasAttr<SelectAnyAttr>() in Decl.cpp around a bit. It only makes a minor
difference for selectany on global variables, so it goes well with the rest of
this patch.

http://reviews.llvm.org/D9042

llvm-svn: 235053

show more ...


# c640ff63 15-Apr-2015 Renato Golin <renato.golin@linaro.org>

Revert "[CodeGen] Fix crash with duplicated mangled name."

This reverts commit r234767, as it was breaking all ARM buildbots for two days and the
assert is not in the code, making it difficult to sp

Revert "[CodeGen] Fix crash with duplicated mangled name."

This reverts commit r234767, as it was breaking all ARM buildbots for two days and the
assert is not in the code, making it difficult to spot the error, which would keep the
bots red for a few more days. New errors were silently introduced because of this bug,
and we don't want this to escalate.

llvm-svn: 234983

show more ...


# b5841332 15-Apr-2015 Richard Trieu <rtrieu@google.com>

Change range-based for-loops to be -Wrange-loop-analysis clean.
No functionality change.

llvm-svn: 234964


# 6f1fadf9 13-Apr-2015 Argyrios Kyrtzidis <akyrtzi@gmail.com>

[CodeGen] Fix crash with duplicated mangled name.

Patch by Yunzhong Gao!

llvm-svn: 234767


# 176efac9 06-Apr-2015 Nico Weber <nicolasweber@gmx.de>

Don't crash when passing a non-existent file to -fprofile-instr-use=.

Fixes a regression from r229434.

llvm-svn: 234141


# 2e80428d 05-Apr-2015 David Blaikie <dblaikie@gmail.com>

clang-format my last commit

(sorry, keep forgetting that)

llvm-svn: 234129


# 1ed728c4 05-Apr-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] More GEP API migrations

Looks like the VTable code in particular will need some work to pass
around the pointee type explicitly.

llvm-svn: 234128


# e3b172af 02-Apr-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] Update for GEP API changes in LLVM

Now the GEP constant utility functions require the type to be explicitly
passed (since eventually the pointer type will be opaque and not con

[opaque pointer type] Update for GEP API changes in LLVM

Now the GEP constant utility functions require the type to be explicitly
passed (since eventually the pointer type will be opaque and not convey
the required type information). For now callers can still pass nullptr
(though none were needed here in Clang, which is nice) if
convenienc/necessary, but eventually that will be disallowed as well.

llvm-svn: 233937

show more ...


# 2809cc74 30-Mar-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

DebugInfo: Use new LLVM API for DebugLoc

Use the new API for `DebugLoc` added in r233573 before the old one
disappears.

llvm-svn: 233589


# 37b417f1 29-Mar-2015 David Majnemer <david.majnemer@gmail.com>

[MS ABI] Rework .xdata HandlerType emission

Utilizing IMAGEREL relocations for synthetic IR constructs isn't
valuable, just clutter. While we are here, simplify HandlerType names
by making the nume

[MS ABI] Rework .xdata HandlerType emission

Utilizing IMAGEREL relocations for synthetic IR constructs isn't
valuable, just clutter. While we are here, simplify HandlerType names
by making the numeric value for the 'adjective' part of the mangled name
instead of appending '.const', etc. The old scheme made for very long
global names and leads to wordy things like '.std_bad_alloc'

llvm-svn: 233503

show more ...


# 7ffc3fbb 20-Mar-2015 Reid Kleckner <reid@kleckner.net>

C++14: Disable sized deallocation by default due to ABI breakage

There are no widely deployed standard libraries providing sized
deallocation functions, so we have to punt and ask the user if they w

C++14: Disable sized deallocation by default due to ABI breakage

There are no widely deployed standard libraries providing sized
deallocation functions, so we have to punt and ask the user if they want
us to use sized deallocation. In the future, when such libraries are
deployed, we can teach the driver to detect them and enable this
feature.

N3536 claimed that a weak thunk from sized to unsized deallocation could
be emitted to avoid breaking backwards compatibility with standard
libraries not providing sized deallocation. However, this approach and
other variations don't work in practice.

With the weak function approach, the thunk has to have default
visibility in order to ensure that it is overridden by other DSOs
providing sized deallocation. Weak, default visibility symbols are
particularly expensive on MachO, so John McCall was considering
disabling this feature by default on Darwin. It also changes behavior
ELF linking behavior, causing certain otherwise unreferenced object
files from an archive to be pulled into the link.

Our second approach was to use an extern_weak function declaration and
do an inline conditional branch at the deletion call site. This doesn't
work because extern_weak only works on MachO if you have some archive
providing the default value of the extern_weak symbol. Arranging to
provide such an archive has the same challenges as providing the symbol
in the standard library. Not to mention that extern_weak doesn't really
work on COFF.

Reviewers: rsmith, rjmccall

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

llvm-svn: 232788

show more ...


# f3d3db65 19-Mar-2015 Artem Belevich <tra@google.com>

Remove .CUDAIsDevice flags from CodeGenOpts as it's already
available in LangOpts.

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

llvm-svn: 232749


# a03849b2 18-Mar-2015 David Majnemer <david.majnemer@gmail.com>

MS ABI: Don't try to emit VF/VB-Tables for extern class templates

There will be an explicit template instantiation in another translation
unit which will provide the definition of the VF/VB-Tables.

MS ABI: Don't try to emit VF/VB-Tables for extern class templates

There will be an explicit template instantiation in another translation
unit which will provide the definition of the VF/VB-Tables.

This fixes PR22932.

llvm-svn: 232680

show more ...


# 91797559 18-Mar-2015 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP] Fix crash on code emitting if errors are found.

Codegen for threadprivate variables (and in some other cases) may cause crash of the compiler if some diagnostic is produced later. This happ

[OPENMP] Fix crash on code emitting if errors are found.

Codegen for threadprivate variables (and in some other cases) may cause crash of the compiler if some diagnostic is produced later. This happens because some of the autogenerated globals are not removed from InternalVars StringMap when llvm::Module is reset.
Differential Revision: http://reviews.llvm.org/D8360

llvm-svn: 232610

show more ...


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1
# 5f0dd616 17-Mar-2015 David Majnemer <david.majnemer@gmail.com>

MS ABI: Emit HandlerMap entries for C++ catch

The HandlerMap describes, to the runtime, what sort of catches surround
the try. In principle, this structure has to be emitted by the backend
because

MS ABI: Emit HandlerMap entries for C++ catch

The HandlerMap describes, to the runtime, what sort of catches surround
the try. In principle, this structure has to be emitted by the backend
because only it knows the layout of the stack (the runtime needs to know
where on the stack the destination of a copy lives, etc.) but there is
some C++ specific information that the backend can't reason about.

Stick this information in special LLVM globals with the relevant
"const", "volatile", "reference" info mangled into the name.

llvm-svn: 232538

show more ...


# 443250f0 17-Mar-2015 David Majnemer <david.majnemer@gmail.com>

WIP

llvm-svn: 232537


# ad803d4b 15-Mar-2015 David Majnemer <david.majnemer@gmail.com>

MS ABI: Don't use qualified pointee types for 'catch' EH TypeDescriptors

Qualifiers are located next to the TypeDescriptor in order to properly
ensure that a pointer type can only be caught by a mor

MS ABI: Don't use qualified pointee types for 'catch' EH TypeDescriptors

Qualifiers are located next to the TypeDescriptor in order to properly
ensure that a pointer type can only be caught by a more qualified catch
handler. This means that a catch handler of type 'const int *' requires
an RTTI object for 'int *'. We got this correct for 'throw' but not for
'catch'.

N.B. We don't currently have the means to store the qualifiers because
LLVM's EH strategy is tailored to the Itanium scheme. The Itanium ABI
stores qualifiers inside the type descriptor in such a way that the
manner of qualification is stored in addition to the pointee type's
descriptor. Perhaps the best way of modeling this for the MS ABI is
using an aggregate type to bundle the qualifiers with the descriptor?
This is tricky because we want to make it clear to the optimization
passes which catch handlers invalidate other handlers.

My current thoughts on a design for this is along the lines of:
{ { TypeDescriptor* TD, i32 QualifierFlags }, i32 MiscFlags }

The idea is that the inner most aggregate is all that is needed to
communicate that one catch handler might supercede another. The
'MiscFlags' field would be used to hold the bitpattern for the notion
that the 'catch' handler does not need to invoke a copy-constructor
because we are catching by reference.

llvm-svn: 232318

show more ...


# dfd511e9 13-Mar-2015 Joerg Sonnenberger <joerg@bec.de>

Simplify.

llvm-svn: 232130


# 3eff5f46 25-Feb-2015 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP] Rename methods of OpenMPRuntime class. NFC.

llvm-svn: 230470


Revision tags: llvmorg-3.6.0
# f63bcaa2 19-Feb-2015 David Majnemer <david.majnemer@gmail.com>

CodeGen: Weak reference temporaries belong in a COMDAT

llvm-svn: 229902


# c9a9c7a6 19-Feb-2015 David Majnemer <david.majnemer@gmail.com>

CodeGen: static constexpr data members should have a linkonce_odr init

Classes can be defined in multiple translation units. This means that
the static constexpr data members should have identical

CodeGen: static constexpr data members should have a linkonce_odr init

Classes can be defined in multiple translation units. This means that
the static constexpr data members should have identical initializers in
all translation units. Implement this by giving the reference temporary
linkonce_odr linkage.

llvm-svn: 229900

show more ...


Revision tags: llvmorg-3.6.0-rc4
# 26a1216a 18-Feb-2015 Zoran Jovanovic <zoran.jovanovic@imgtec.com>

Change representation of member function pointers for MIPS targets
Differential Revision: http://reviews.llvm.org/D7148

llvm-svn: 229680


1...<<41424344454647484950>>...87