forked from GPUOpen-Drivers/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged main:0a3cf7f4762e into amd-gfx:ab07f2cc37e7
Local branch amd-gfx ab07f2c Merged main:4e0e79dd349a into amd-gfx:edf208676d23 Remote branch main 0a3cf7f AMDGPU/GlobalISel: Add baseline IR tests for fdiv
- Loading branch information
Showing
45 changed files
with
4,066 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// RUN: %clang_cc1 -fsyntax-only %s -ast-dump | FileCheck %s | ||
|
||
int(&&intu_rvref)[] {1,2,3,4}; | ||
// CHECK: VarDecl 0x[[GLOB_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit | ||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue | ||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]' | ||
// CHECK-NEXT: InitListExpr {{.*}} 'int [4]' | ||
|
||
// CHECK: FunctionDecl {{.*}} static_const | ||
void static_const() { | ||
static const int(&&intu_rvref)[] {1,2,3,4}; | ||
// CHECK: VarDecl 0x[[STATIC_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'const int (&&)[4]' static listinit | ||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'const int [4]' xvalue | ||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int [4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]' | ||
// CHECK-NEXT: InitListExpr {{.*}} 'const int [4]' | ||
} | ||
|
||
// CHECK: FunctionDecl {{.*}} const_expr | ||
constexpr int const_expr() { | ||
int(&&intu_rvref)[]{1, 2, 3, 4}; | ||
// CHECK: VarDecl 0x[[CE_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit | ||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue | ||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]' | ||
// CHECK-NEXT: InitListExpr {{.*}} 'int [4]' | ||
return intu_rvref[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// REQUIRES: arm-registered-target | ||
// RUN: %clang -target armv7-linux-gnueabihf -moutline -c %s -### 2>&1 | FileCheck %s -check-prefix=ON | ||
// ON: "-mllvm" "-enable-machine-outliner" | ||
// RUN: %clang -target armv7-linux-gnueabihf -flto -moutline %s -### 2>&1 | FileCheck %s -check-prefix=ON-LTO | ||
// ON-LTO: "-plugin-opt=-enable-machine-outliner" | ||
// RUN: %clang -target armv7-linux-gnueabihf -moutline -mno-outline -c %s -### 2>&1 | FileCheck %s -check-prefix=OFF | ||
// OFF: "-mllvm" "-enable-machine-outliner=never" | ||
// RUN: %clang -target armv7-linux-gnueabihf -flto -moutline -mno-outline %s -### 2>&1 | FileCheck %s -check-prefix=OFF-LTO | ||
// OFF-LTO: "-plugin-opt=-enable-machine-outliner=never" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//===- PreprocessorOptions.h ------------------------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
/// | ||
/// \file | ||
/// This file contains the declaration of the PreprocessorOptions class, which | ||
/// is the class for all preprocessor options. | ||
/// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_FLANG_PREPROCESSOROPTIONS_H | ||
#define LLVM_FLANG_PREPROCESSOROPTIONS_H | ||
|
||
#include "llvm/ADT/StringRef.h" | ||
|
||
namespace Fortran::frontend { | ||
|
||
/// This class is used for passing the various options used | ||
/// in preprocessor initialization to the parser options. | ||
class PreprocessorOptions { | ||
public: | ||
std::vector<std::pair<std::string, /*isUndef*/ bool>> macros; | ||
|
||
public: | ||
PreprocessorOptions() {} | ||
|
||
void addMacroDef(llvm::StringRef name) { | ||
macros.emplace_back(std::string(name), false); | ||
} | ||
|
||
void addMacroUndef(llvm::StringRef name) { | ||
macros.emplace_back(std::string(name), true); | ||
} | ||
}; | ||
|
||
} // namespace Fortran::frontend | ||
|
||
#endif // LLVM_FLANG_PREPROCESSOROPTIONS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.