[flang] revert last pushes

Original-commit: flang-compiler/f18@39335746a9
This commit is contained in:
Eric Schweitz 2019-04-24 11:41:40 -07:00
parent 1c15fa61a8
commit 777b89fdee
7 changed files with 712 additions and 847 deletions

View File

@ -17,4 +17,3 @@ add_subdirectory(evaluate)
add_subdirectory(FIR)
add_subdirectory(parser)
add_subdirectory(semantics)
add_subdirectory(bridge)

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@ struct FIRBuilder {
BasicBlock *GetInsertionPoint() const { return cursorBlock_; }
// create the various statements
QualifiedStmt<Addressable_impl> CreateAddr(const Expression *e) {
QualifiedStmt<Addressable_impl> CreateAddr(const Expression &e) {
return QualifiedInsert<Addressable_impl>(LocateExprStmt::Create(e));
}
QualifiedStmt<Addressable_impl> CreateAddr(Expression &&e) {
@ -80,16 +80,16 @@ struct FIRBuilder {
Statement *CreateDealloc(QualifiedStmt<AllocateInsn> alloc) {
return Insert(DeallocateInsn::Create(alloc));
}
Statement *CreateExpr(const Expression *e) {
Statement *CreateExpr(const Expression &e) {
return Insert(ApplyExprStmt::Create(e));
}
Statement *CreateExpr(Expression &&e) {
return Insert(ApplyExprStmt::Create(std::move(e)));
}
ApplyExprStmt *MakeAsExpr(const Expression *e) {
ApplyExprStmt *MakeAsExpr(const Expression &e) {
return GetApplyExpr(CreateExpr(e));
}
QualifiedStmt<ApplyExprStmt> QualifiedCreateExpr(const Expression *e) {
QualifiedStmt<ApplyExprStmt> QualifiedCreateExpr(const Expression &e) {
return QualifiedInsert<ApplyExprStmt>(ApplyExprStmt::Create(e));
}
QualifiedStmt<ApplyExprStmt> QualifiedCreateExpr(Expression &&e) {

View File

@ -230,7 +230,7 @@ public:
struct Default {}; // RANK DEFAULT
struct AssumedSize {}; // RANK(*)
struct Exactly { // RANK(n)
Expression *v;
const Expression *v;
};
using ValueType = std::variant<Exactly, AssumedSize, Default>;
using ValueSuccPairType = std::pair<ValueType, BasicBlock *>;
@ -295,7 +295,7 @@ protected:
// Compute the value of an expression
class ApplyExprStmt : public ActionStmt_impl {
public:
static ApplyExprStmt Create(const Expression *e) { return ApplyExprStmt{*e}; }
static ApplyExprStmt Create(const Expression &e) { return ApplyExprStmt{e}; }
static ApplyExprStmt Create(Expression &&e) {
return ApplyExprStmt{std::move(e)};
}
@ -323,8 +323,8 @@ protected:
// Compute the location of an expression
class LocateExprStmt : public Addressable_impl {
public:
static LocateExprStmt Create(const Expression *e) {
return LocateExprStmt(*e);
static LocateExprStmt Create(const Expression &e) {
return LocateExprStmt(e);
}
static LocateExprStmt Create(Expression &&e) { return LocateExprStmt(e); }

View File

@ -1,23 +0,0 @@
# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(FortranBridge
ir-gen.cc
)
target_link_libraries(FortranBridge
FortranCommon
FortranFIR
)

View File

@ -1,22 +0,0 @@
// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ir-gen.h"
namespace Fortran::bridge {
void GenerateIR(void) {
}
}

View File

@ -1,20 +0,0 @@
// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
namespace Fortran::bridge {
/// Generate LLVM-IR
void GenerateIR(void);
}