Skip to content

Commit b39b050

Browse files
author
Simon Moll
committed
Merge remote-tracking branch 'necgh/hpce/develop' into merge/hpce/develop
2 parents fa0b8b5 + 3986590 commit b39b050

File tree

240 files changed

+31971
-24327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+31971
-24327
lines changed

.gitmodules

Whitespace-only changes.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ This is an example work-flow and configuration to get and build the LLVM source:
5050

5151
* ``cd llvm-project``
5252

53-
* ``cmake -S llvm -B build -G <generator> [options]``
54-
5553
Some common build system generators are:
5654

5755
* ``Ninja`` --- for generating [Ninja](https://ninja-build.org)

clang/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
cscope.files
2323
cscope.out
2424
/tags
25+
/TAGS
26+
.ftpconfig
2527

2628
#==============================================================================#
2729
# Directories to ignore (do not add trailing '/'s, they skip symlinks).

clang/cmake/caches/VectorEngine-Stage-1.cmake

Lines changed: 0 additions & 122 deletions
This file was deleted.

clang/cmake/caches/VectorEngine-Stage-2.cmake

Lines changed: 0 additions & 124 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
12+
find_path (
13+
NECAURORA_LIBELF_INCLUDE_DIR
14+
NAMES
15+
libelf.h
16+
PATHS
17+
/usr/include
18+
/usr/local/include
19+
/opt/local/include
20+
/sw/include
21+
ENV CPATH
22+
PATH_SUFFIXES
23+
libelf)
24+
25+
find_library (
26+
NECAURORA_LIBELF_LIBRARIES
27+
NAMES
28+
elf
29+
PATHS
30+
/usr/lib
31+
/usr/local/lib
32+
/opt/local/lib
33+
/sw/lib
34+
ENV LIBRARY_PATH
35+
ENV LD_LIBRARY_PATH)
36+
37+
include(FindPackageHandleStandardArgs)
38+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
39+
NECAURORA_LIBELF
40+
DEFAULT_MSG
41+
NECAURORA_LIBELF_LIBRARIES
42+
NECAURORA_LIBELF_INCLUDE_DIR)
43+
44+
mark_as_advanced(
45+
NECAURORA_LIBELF_INCLUDE_DIR
46+
NECAURORA_LIBELF_LIBRARIES)
47+

clang/include/clang/AST/DeclBase.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Module;
5454
class NamedDecl;
5555
class ObjCContainerDecl;
5656
class ObjCMethodDecl;
57+
class PrinterHelper;
5758
struct PrintingPolicy;
5859
class RecordDecl;
5960
class SourceManager;
@@ -1171,7 +1172,8 @@ class alignas(8) Decl {
11711172
void print(raw_ostream &Out, unsigned Indentation = 0,
11721173
bool PrintInstantiation = false) const;
11731174
void print(raw_ostream &Out, const PrintingPolicy &Policy,
1174-
unsigned Indentation = 0, bool PrintInstantiation = false) const;
1175+
unsigned Indentation = 0, bool PrintInstantiation = false,
1176+
PrinterHelper *StmtHelper=nullptr) const;
11751177
static void printGroup(Decl** Begin, unsigned NumDecls,
11761178
raw_ostream &Out, const PrintingPolicy &Policy,
11771179
unsigned Indentation = 0);

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,6 +2457,8 @@ def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runti
24572457
Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
24582458
def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Group<f_Group>,
24592459
Flags<[NoArgumentUnused, HelpHidden]>;
2460+
def fopenmp_nec_compiler_EQ : Joined<["-"], "fopenmp-nec-compiler=">, Group<f_Group>,
2461+
Flags<[CC1Option, NoArgumentUnused]>, HelpText<"Offloading compiler for NEC SX-Aurora ('clang' [default],'rvclang' or 'ncc')">;
24602462
def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
24612463
Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
24622464
def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>,

clang/lib/AST/Decl.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,16 @@ LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D,
913913
if (!isExternallyVisible(LV.getLinkage()))
914914
return LinkageInfo(LV.getLinkage(), DefaultVisibility, false);
915915

916+
// FIXME: This is a workaround to have visible globals in `#pragma omp declare target` on VE.
917+
bool VisibleTargetGlobals =
918+
Context.getAuxTargetInfo() &&
919+
(Context.getTargetInfo().getTriple().getArch() !=
920+
Context.getAuxTargetInfo()->getTriple().getArch());
921+
922+
// Mark the symbols as hidden when compiling for the device.
923+
if (!VisibleTargetGlobals && Context.getLangOpts().OpenMP && Context.getLangOpts().OpenMPIsDevice)
924+
LV.mergeVisibility(HiddenVisibility, /*newExplicit=*/false);
925+
916926
return LV;
917927
}
918928

0 commit comments

Comments
 (0)